slate-edit-list
Version:
A Slate plugin to handle keyboard events in lists.
63 lines (56 loc) • 1.21 kB
YAML
document:
nodes:
- kind: block
type: ul_list
nodes:
- kind: block
type: list_item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
key: 'start'
text: 'First item'
- kind: block
type: list_item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
text: 'Second item, with nested list'
- kind: block
type: ol_list
nodes:
- kind: block
type: list_item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
key: 'end'
text: 'First item in the nested list'
- kind: block
type: list_item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
text: 'Second item in the nested list'
- kind: block
type: list_item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
text: 'Third item'
selection:
anchorKey: 'start'
anchorOffset: 2
focusKey: 'end'
focusOffset: 4
isFocused: true