react-code-dataset / slate /packages /slate-hyperscript /test /fixtures /cursor-across-elements-end.tsx
Download slate/packages/slate-hyperscript/test/fixtures/cursor-across-elements-end.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 564 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/slate/packages/slate-hyperscript/test/fixtures/cursor-across-elements-end.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/slate/packages/slate-hyperscript/test/fixtures/cursor-across-elements-end.tsx
-
curl -L -o cursor-across-elements-end.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/slate/packages/slate-hyperscript/test/fixtures/cursor-across-elements-end.tsx
564 Bytes
| /** @jsx jsx */ | |
| import { jsx } from 'slate-hyperscript' | |
| export const input = ( | |
| <editor> | |
| <element> | |
| one | |
| <anchor /> | |
| </element> | |
| <element> | |
| two | |
| <focus /> | |
| </element> | |
| </editor> | |
| ) | |
| export const output = { | |
| children: [ | |
| { | |
| children: [ | |
| { | |
| text: 'one', | |
| }, | |
| ], | |
| }, | |
| { | |
| children: [ | |
| { | |
| text: 'two', | |
| }, | |
| ], | |
| }, | |
| ], | |
| selection: { | |
| anchor: { | |
| path: [0, 0], | |
| offset: 3, | |
| }, | |
| focus: { | |
| path: [1, 0], | |
| offset: 3, | |
| }, | |
| }, | |
| } | |