Skip to main content

FlexRichEditor

The same plugin supports FLEX Fields’ FlexRichEditor, which extends the native Filament editor. Studio does not replace its editing engine or upload configuration:
The example explicitly chooses toolbar buttons; include the other FLEX tools your application needs. Selecting an existing Studio image inserts a reference URL through the native command. It does not upload the image again or run FLEX’s attachment conversion pipeline a second time. FLEX Fields remains optional for applications using only native Filament editors.

Limit selection to an approved library

This field uses the same plugin options and render pipeline as RichEditor. Keep your existing FLEX Fields editor options on the field and include the Studio tool alongside the available native tools.

Save and render private references

Set persistAttachmentIds: true to persist the workspace, asset and version in attachment IDs. Keep the same plugin installed when rendering saved JSON.
The example assumes the imports from the first example and an authorized article. Use the Studio tool for attachment selection in this mode. The Studio attachment provider rejects native direct attachment uploads. Configure the host’s rendered content policy and current viewer authorization as part of your application.

Use ready responsive conversions

With the default URL-based insertion mode, imageSizes controls the rendered image width hint. Studio uses available ready conversions of the same encoding to build responsive attributes. Keep rich-editor-extension.js available beside the module and keep the plugin in the render pipeline. See responsive image behavior. For access and asset ownership, follow editor retention. For missing scripts or styles, use FLEX integration diagnostics.

Configure the editor’s media behavior

Render saved FLEX content

Use the same plugin configuration when rendering JSON content. This lets the attachment provider and responsive image extension resolve the saved content.
The $studioPlugin variable is the configured RichEditorStudioPlugin used by the form. The default inline types are JPEG, PNG, WebP, AVIF and GIF. Pass acceptedMimeTypes: null if the application deliberately supports inserting other assets as links. Native editor attachment buttons have their own configuration. See private attachment IDs for persistence and provider behavior, and FLEX assets when the integration’s scripts or styles fail to load.