1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-27 09:04:31 +02:00
This commit is contained in:
Cameron Ackerman
2020-03-05 09:53:23 -08:00
committed by GitHub
parent 1e7d21f7cd
commit a79e11c74e
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
/** @jsx jsx */
import { Node } from 'slate'
import { jsx } from 'slate-hyperscript'
export const input = (
<editor>
<element>
<text key="a" />
<text key="b" />
</element>
</editor>
)
export const test = value => {
return Node.first(value, [0])
}
export const output = [<text key="a" />, [0, 0]]

View File

@@ -0,0 +1,19 @@
/** @jsx jsx */
import { Node } from 'slate'
import { jsx } from 'slate-hyperscript'
export const input = (
<editor>
<element>
<text key="a" />
<text key="b" />
</element>
</editor>
)
export const test = value => {
return Node.last(value, [0])
}
export const output = [<text key="b" />, [0, 1]]