Class: Storyblok::Richtext::Marks::Highlight
- Inherits:
-
Mark
- Object
- Mark
- Storyblok::Richtext::Marks::Highlight
show all
- Defined in:
- lib/storyblok/richtext/html_renderer/marks/highlight.rb
Instance Attribute Summary
Attributes inherited from Mark
#type
Instance Method Summary
collapse
Methods inherited from Mark
#initialize
Instance Method Details
#matching ⇒ Object
5
6
7
|
# File 'lib/storyblok/richtext/html_renderer/marks/highlight.rb', line 5
def matching
@node['type'] === 'highlight'
end
|
#tag ⇒ Object
9
10
11
12
13
14
15
16
17
|
# File 'lib/storyblok/richtext/html_renderer/marks/highlight.rb', line 9
def tag
attrs = {
style: "background-color:#{@node['attrs']['color']};"
}
[{
tag: "span",
attrs: attrs
}]
end
|