Class: ProsemirrorToHtml::Marks::Link
- Defined in:
- lib/prosemirror_to_html/marks/link.rb
Instance Method Summary collapse
Methods inherited from Mark
Constructor Details
This class inherits a constructor from ProsemirrorToHtml::Marks::Mark
Instance Method Details
#tag ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/prosemirror_to_html/marks/link.rb', line 7 def tag attrs = {} attrs['href'] = @mark.attrs.href attrs['target'] = @mark.attrs.target if @mark.attrs.target attrs['title'] = @mark.attrs.title if @mark.attrs.title attrs['rel'] = @mark.attrs.rel if @mark.attrs.rel [ { tag: self.class.tag_name, attrs: attrs } ] end |