1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-08 22:20:41 +02:00

add failing test for 340

This commit is contained in:
Tyler Johnson
2016-09-20 14:20:14 -06:00
parent e486e87311
commit 7d012ec769
3 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
export default function (state) {
const { selection, blocks } = state
const range = selection.moveToRangeOf(blocks.first(), blocks.last())
return state
.transform()
.wrapBlockAtRange(range, 'bulleted-list')
.apply()
}

View File

@@ -0,0 +1,18 @@
nodes:
- kind: block
type: list-item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
text: word1
- kind: block
type: list-item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
text: word2

View File

@@ -0,0 +1,21 @@
nodes:
- kind: block
type: bulleted-list
nodes:
- kind: block
type: list-item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
text: word1
- kind: block
type: list-item
nodes:
- kind: block
type: paragraph
nodes:
- kind: text
text: word2