CKEditor5.Components.Editor (ckeditor5 v0.1.0)

LiveView component for CKEditor 5 integration in Phoenix Framework.

This module provides the necessary functionality to render and manage CKEditor 5 instances within Phoenix LiveView applications.

Summary

Functions

Renders the CKEditor 5 component in a LiveView.

Functions

render(assigns)

Renders the CKEditor 5 component in a LiveView.

Attributes

  • id (:string) - The ID for the editor instance.

  • preset (:string) - The name of the preset to use. Defaults to "default".

  • editable_height (:string) - The height of the editable area (e.g., "300px"). If not provided, the height will be determined by the editor's content. Defaults to nil.

  • type (:string) - The type of the editor. Overrides the type from the preset. 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.