module CKEditor5::Rails::Hooks::Form::FormBuilderExtension
def ckeditor5(method, options = {})
- Example: Simple Form integration -
Example: Using custom preset and type -
Example: With custom styling and required field -
Example: Basic usage -
Options Hash:
(**options)
-
:style
(String
) -- Inline CSS styles -
:class
(String
) -- CSS classes for the editor -
:required
(Boolean
) -- Whether the field is required -
:initial_data
(String
) -- Initial content for the editor -
:config
(Hash
) -- Custom editor configuration -
:type
(Symbol
) -- Editor type (classic, inline, balloon, decoupled) -
:preset
(Symbol
) -- The preset configuration to use
Parameters:
-
options
(Hash
) -- Options for customizing the editor -
method
(Symbol
) -- The model attribute to edit
def ckeditor5(method, options = {}) EditorInputBuilder.new(object_name, object, @template) .build_editor(method, options) end