CKEditor5.Components.Editable (ckeditor5 v0.1.0)

Live View component for rendering an editable area in CKEditor 5. It may be used with decoupled editors or multiroot editors.

Summary

Functions

render(assigns)

Attributes

  • id (:string) - The ID of the component. If not provided, it will be generated from the editor_id and name attributes.

  • root (:string) (required) - The name of the root that is associated with this editable area. Editor may contain multiple roots which correspond to separate documents (or sections) of the editor. This name will be used as a key to identify the editable area in the editor's data.

  • editor_id (:string) - The ID of the editor instance this editable belongs to. If not provided, the first editor in the page will be used.

    Defaults to nil.

  • name (:string) - The name of the input field that will be used to submit the content. If not provided, it will be derived from the :field attribute when available. This is useful for form integration, allowing the content to be submitted as part of a form.

    Defaults to nil.

  • form (:any) - The Phoenix.HTML.Form for form integration. Defaults to nil.

  • field (Phoenix.HTML.FormField) - The Phoenix.HTML.FormField for form integration. Defaults to nil.

  • value (:string) - The initial value for the content. This will be set when the component is initialized. If not specified, it will default to an empty string.

    Defaults to "".

  • required (:boolean) - Marks the input as required. This will be used to validate the content when the form is submitted. Defaults to false.

  • Global attributes are accepted.