Class: ActionText::Editor::TrixEditor
- Inherits:
-
ActionText::Editor
- Object
- ActionText::Editor
- ActionText::Editor::TrixEditor
- Defined in:
- actiontext/lib/action_text/editor/trix_editor.rb
Overview
:nodoc:
Defined Under Namespace
Classes: Tag
Instance Attribute Summary
Attributes inherited from ActionText::Editor
Instance Method Summary collapse
- #as_canonical(editable_fragment) ⇒ Object
- #as_editable(canonical_fragment) ⇒ Object
- #editor_tag ⇒ Object
Methods inherited from ActionText::Editor
Methods included from ActiveSupport::Autoload
#autoload, #autoload_at, #autoload_under, #eager_autoload, #eager_load!
Constructor Details
This class inherits a constructor from ActionText::Editor
Instance Method Details
#as_canonical(editable_fragment) ⇒ Object
5 6 7 |
# File 'actiontext/lib/action_text/editor/trix_editor.rb', line 5 def as_canonical(editable_fragment) editable_fragment.replace(TrixAttachment::SELECTOR, &method(:from_trix_attachment)) end |
#as_editable(canonical_fragment) ⇒ Object
9 10 11 |
# File 'actiontext/lib/action_text/editor/trix_editor.rb', line 9 def as_editable(canonical_fragment) canonical_fragment.replace(Attachment.tag_name, &method(:to_trix_attachment)) end |