Module: ActionText::HtmlConversion
- Extended by:
- HtmlConversion
- Included in:
- HtmlConversion
- Defined in:
- lib/action_text/html_conversion.rb
Instance Method Summary collapse
- #create_element(tag_name, attributes = {}) ⇒ Object
- #fragment_for_html(html) ⇒ Object
- #node_to_html(node) ⇒ Object
Instance Method Details
#create_element(tag_name, attributes = {}) ⇒ Object
17 18 19 |
# File 'lib/action_text/html_conversion.rb', line 17 def create_element(tag_name, attributes = {}) document.create_element(tag_name, attributes) end |
#fragment_for_html(html) ⇒ Object
13 14 15 |
# File 'lib/action_text/html_conversion.rb', line 13 def fragment_for_html(html) document.fragment(html) end |
#node_to_html(node) ⇒ Object
9 10 11 |
# File 'lib/action_text/html_conversion.rb', line 9 def node_to_html(node) node.to_html(save_with: Nokogiri::XML::Node::SaveOptions::AS_HTML) end |