Class: TipTap::Nodes::TaskItem
- Inherits:
-
ListItem
- Object
- TipTap::Node
- ListItem
- TipTap::Nodes::TaskItem
- Defined in:
- lib/tip_tap/nodes/task_item.rb
Instance Attribute Summary
Attributes included from HtmlRenderable
Attributes included from HasContent
Instance Method Summary collapse
Methods inherited from ListItem
#bullet_list, #ordered_list, #paragraph, #task_list
Methods included from PlainTextRenderable
Methods included from JsonRenderable
#include_empty_content_in_json?, #to_h
Methods included from HtmlRenderable
#html_attributes, #html_class_name, #html_tag, included, #inline_styles, #to_html
Methods included from HasContent
#add_content, #blank?, #each, #find_node, included, #initialize, #size
Methods included from Registerable
Instance Method Details
#checked? ⇒ Boolean
12 13 14 |
# File 'lib/tip_tap/nodes/task_item.rb', line 12 def checked? attrs["checked"] end |
#to_markdown(context = Markdown::Context.root) ⇒ Object
16 17 18 19 |
# File 'lib/tip_tap/nodes/task_item.rb', line 16 def to_markdown(context = Markdown::Context.root) marker = checked? ? "- [x] " : "- [ ] " super(context, marker: marker) end |