NewAI Enhanced
v2.1.16
v2.1.16
Security
- Attachment
hrefattributes now validated withDOMPurify.isValidAttribute()before rendering
Features
.editorElementsand.editorElementproperties on<trix-toolbar>to access associated editors<trix-editor>can now work without hidden<input>element usingElementInternals(setwillCreateInput = falseinbefore-trix-initialize)- Alt text support for attachment previews via
attachment.setAttributes({ alt: "..." }) setPreviewURL()andgetPreviewURL()methods onManagedAttachmentfor customizing preview URLstrix-before-renderevent with customizablerenderproperty for morph-style rendering integration- HTML content inside
<trix-editor>tags now safely sanitized and loaded as initial value when no associated<input>present
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 https://github.com/basecamp/trix/pull/1234
- @MatheusRich made their first contribution in https://github.com/basecamp/trix/pull/1162
Full Changelog: https://github.com/basecamp/trix/compare/v2.1.15...v2.1.16