Class: Trek::Form::ContentEditorComponent

Inherits:
ViewComponent::Form::FieldComponent
  • Object
show all
Includes:
CssClassesHelpers, StimulusHelpers, Turbo::FramesHelper, ViewComponent::Translatable
Defined in:
app/components/trek/form/content_editor_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from StimulusHelpers

#stimulus_action, #stimulus_class, #stimulus_class_hash, #stimulus_class_key, #stimulus_target, #stimulus_target_hash, #stimulus_target_key, #stimulus_value, #stimulus_value_hash, #stimulus_value_key

Methods included from CssClassesHelpers

#class_for, #class_names_for, #root_class

Methods included from IdentifierHelper

#identifier

Constructor Details

#initialize(form, object_name, method_name, options = {}) ⇒ ContentEditorComponent

Returns a new instance of ContentEditorComponent.



13
14
15
16
17
18
19
20
21
22
# File 'app/components/trek/form/content_editor_component.rb', line 13

def initialize(form, object_name, method_name, options = {})
  @nodes = options.delete(:nodes)
  @nodes = true if @nodes.nil?
  @blocks = options.delete(:blocks)
  @blocks = true if @blocks.nil?
  @floating = options.delete(:floating)
  @floating = true if @floating.nil?

  super
end

Instance Attribute Details

#blocksObject (readonly)

Returns the value of attribute blocks.



11
12
13
# File 'app/components/trek/form/content_editor_component.rb', line 11

def blocks
  @blocks
end

#floatingObject (readonly)

Returns the value of attribute floating.



11
12
13
# File 'app/components/trek/form/content_editor_component.rb', line 11

def floating
  @floating
end

#nodesObject (readonly)

Returns the value of attribute nodes.



11
12
13
# File 'app/components/trek/form/content_editor_component.rb', line 11

def nodes
  @nodes
end