Module: Spina::Embeds::TrixConversion
- Extended by:
- ActiveSupport::Concern
- Included in:
- Base
- Defined in:
- lib/spina/embeds/trix_conversion.rb
Instance Method Summary collapse
-
#to_trix_attachment(content = trix_attachment_content) ⇒ Object
Wrap rendered partial in an <embed> tag for Trix.
- #wrap_with_embed_tag(html) ⇒ Object
Instance Method Details
#to_trix_attachment(content = trix_attachment_content) ⇒ Object
Wrap rendered partial in an <embed> tag for Trix
7 8 9 |
# File 'lib/spina/embeds/trix_conversion.rb', line 7 def (content = ) (content) end |
#wrap_with_embed_tag(html) ⇒ Object
11 12 13 14 15 |
# File 'lib/spina/embeds/trix_conversion.rb', line 11 def (html) element = html_document.create_element("spina-embed", ) element.inner_html = html element.to_html end |