Skip to content

Tinymce Initializer

tinymce turns a textarea into a TinyMCE rich-text (WYSIWYG) editor with image upload support. It backs the <x-rich-editor> component and follows the page's locale, text direction, and light/dark theme.

Enable it

You rarely write init="tinymce" yourself — render the <x-rich-editor> component, which emits a textarea carrying the attribute and loads the vendor script:

blade
<x-rich-editor name="body" :title="__('Body')" :value="old('body', $post?->body)" />

For a translatable editor, wrap it:

blade
<x-translatable component="rich-editor" name="body" :title="__('Body')"
    :value="$post ? $post->getTranslations('body') : old('body')" />

See Asset & Init System for how the init attribute is wired.

Options

The toolbar, plugins, and height come preconfigured, and the editor reads its language, direction, and skin from the page — so there is little to set per field. Images pasted or picked in the editor upload automatically through the configured upload endpoint.

The field must have an id (the component generates one if you omit it). When the user toggles light/dark, the editor rebuilds to pick up the new skin.

Proprietary — for use within the Redot Dashboard. Product site: redot.dev