123456789_123456789_123456789_123456789_123456789_

Class: ActionText::Editor::Tag

Do not use. This class is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: actiontext/lib/action_text/editor.rb

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(editor_name, options = {}) ⇒ Tag

[ GitHub ]

  
# File 'actiontext/lib/action_text/editor.rb', line 61

def initialize(editor_name, options = {})
  @editor_name = editor_name
  @options = options
end

Class Attribute Details

.id (rw)

[ GitHub ]

  
# File 'actiontext/lib/action_text/editor.rb', line 56

cattr_accessor(:id, instance_accessor: false) { 0 }

Instance Attribute Details

#editor_name (readonly)

[ GitHub ]

  
# File 'actiontext/lib/action_text/editor.rb', line 58

attr_reader :editor_name

#options (readonly)

[ GitHub ]

  
# File 'actiontext/lib/action_text/editor.rb', line 59

attr_reader :options

Instance Method Details

#element_name

[ GitHub ]

  
# File 'actiontext/lib/action_text/editor.rb', line 66

def element_name
  "#{editor_name}-editor"
end

#render_in(view_context)

[ GitHub ]

  
# File 'actiontext/lib/action_text/editor.rb', line 70

def render_in(view_context)
  options[:class] ||= "#{editor_name}-content"

  view_context.(element_name, nil, options)
end