mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 11:42:53 +02:00
Added test for 'move-node' operation (#4361)
This commit is contained in:
22
packages/slate/test/operations/move_node/path-not-equals-new-path.tsx
Executable file
22
packages/slate/test/operations/move_node/path-not-equals-new-path.tsx
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
/** @jsx jsx */
|
||||||
|
import { jsx } from 'slate-hyperscript'
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<editor>
|
||||||
|
<element>1</element>
|
||||||
|
<element>2</element>
|
||||||
|
</editor>
|
||||||
|
)
|
||||||
|
export const operations = [
|
||||||
|
{
|
||||||
|
type: 'move_node',
|
||||||
|
path: [0],
|
||||||
|
newPath: [1],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
export const output = (
|
||||||
|
<editor>
|
||||||
|
<element>2</element>
|
||||||
|
<element>1</element>
|
||||||
|
</editor>
|
||||||
|
)
|
Reference in New Issue
Block a user