Security
- Attachment
hrefattributes are now validated usingDOMPurify.isValidAttribute()before rendering as anchor tags. @flavorjones
Added
- New
.editorElementsand.editorElementproperties have been added to<trix-toolbar>elements for accessing associated<trix-editor>elements. @seanpdoyle #1127 <trix-editor>elements can now function without an associated<input type="hidden">element when usingElementInternals. This is configured by settingwillCreateInput = falsein thebefore-trix-initializeevent and using the[name]attribute for form submissions. @seanpdoyle #1128- Alt text can now be set on attachment preview images via
attachment.setAttributes({ alt: "..." })intrix-attachment-addevent handlers. @seanpdoyle #1198 - Attachment preview URLs can be customized using the new
setPreviewURL()andgetPreviewURL()methods onManagedAttachment, accessible from event handlers. @seanpdoyle #1210 - A new
trix-before-renderevent is dispatched before rendering, with a customizablerenderproperty for advanced use cases like morph-style rendering integration. @seanpdoyle #1252 - When no associated
<input>element is present, HTML content within<trix-editor>tags is now safely sanitized and loaded as the initial editor value. @seanpdoyle #1253
New Contributors
- @flavorjones made their first contribution in #1234
- @MatheusRich made their first contribution in #1162
Full Changelog: v2.1.15...v2.1.16