Skip to content

v2.1.16

Latest

Choose a tag to compare

@flavorjones flavorjones released this 30 Dec 20:26
5c8b688

Security

  • Attachment href attributes are now validated using DOMPurify.isValidAttribute() before rendering as anchor tags. @flavorjones

Added

  • New .editorElements and .editorElement properties 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 using ElementInternals. This is configured by setting willCreateInput = false in the before-trix-initialize event and using the [name] attribute for form submissions. @seanpdoyle #1128
  • Alt text can now be set on attachment preview images via attachment.setAttributes({ alt: "..." }) in trix-attachment-add event handlers. @seanpdoyle #1198
  • Attachment preview URLs can be customized using the new setPreviewURL() and getPreviewURL() methods on ManagedAttachment, accessible from event handlers. @seanpdoyle #1210
  • A new trix-before-render event is dispatched before rendering, with a customizable render property 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

Full Changelog: v2.1.15...v2.1.16