CKEditor5.Components.RootValueSentinel (ckeditor5_phoenix v1.22.0)

View Source

This module defines a Phoenix component that serves as a sentinel for the root value of the CKEditor 5 instance in a LiveView. It renders a hidden div element that holds the current value of the editor, which can be used for synchronization between the client and server.

Summary

Functions

Renders a hidden div element that contains the current value of the editor. This is used as a sentinel for the editor's root value, allowing for synchronization between the client and server.

Functions

render(assigns)

Renders a hidden div element that contains the current value of the editor. This is used as a sentinel for the editor's root value, allowing for synchronization between the client and server.

Attributes

  • editor_id (:string) (required) - The ID for the editor instance.
  • value (:string) (required) - The current value of the editor.
  • root (:string) - The name of the root element for multi-root editors. If not provided, it defaults to 'main'. Defaults to "main".
  • root_attrs (:map) - A map of HTML attributes to apply to the editor root element (e.g., class, data-*, etc.). Defaults to %{}.