DOCS Expand upgrade notes for Insert Media modal in 4.6.0 release

This commit is contained in:
Garion Herman 2020-06-25 15:05:13 +12:00
parent 2048db1101
commit 35d31919f2

View File

@ -56,18 +56,28 @@ class MyDataObject extends DataObject
}
```
## Editing files directly in the insert-media modal{#in-modal-editing}
## Editing files directly in the Insert Media modal {#in-modal-editing}
Editors can now directly edit file details when selecting a file in an UploadField or when inserting media in a
HTMLEditorField. The "image placement" and "file link" forms that show when inserting an image or a link in an
HTMLEditorField have been simplified.
Authors can now directly edit file details when selecting a file in an
`UploadField` or when inserting media in a `HTMLEditorField`. The "image
placement" and "file link" forms that show when inserting an image or a link in
an `HTMLEditorField` have been simplified.
This does mean that the order and structure of fields have changed somewhat. If you have customised the forms in the
asset administration area or in the "Insert Media Modal", you should do some regression testing when upgrading to
make sure your customisations still work as expected.
If you have customised the fields in the asset administration UI or Insert Media
modal, you will need to do some regression testing when upgrading, and will
likely need to make some minor adjustments to your code.
If your project uses the popular [jonom/focuspoint](https://github.com/jonom/silverstripe-focuspoint) community
module, you should upgrade it as well.
Implementing the new Edit Details UI required filtering the fields generated in
`File::getCMSFields()` into two `Form`s. The implementation in 4.6.0 does not
expose a clear API to custom fields for differentiating between the `Form`s, and
by default any fields added via an extension will appear in both views. For the
time being, a simple way to resolve this is to check for the presence of the
`Editor.Details.Title` field and add your field based on this. See the community
module [jonom/focuspoint](https://github.com/jonom/silverstripe-focuspoint/pull/78/files#diff-cc697eb8345aa25a5f88c89d1a87ff6aR27-R34)
for an example implementation, and ensure you update this module during your
upgrade to 4.6.0 if you have it installed.
We intend to improve this pattern in a future release of Silverstripe CMS.
## MIME Type validation now a core module {#mime-validator}