1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-05 23:07:27 +02:00
Files
slate/packages/slate-hyperscript/test/fixtures/selection-offset-start.tsx
Isaac Schultz 2a9ceee03c using js-to-ts converter on JSX. (#3906)
Added 'include' parameter to tsconfig to tell the compiler to only look inside the src directory
2021-03-31 16:48:09 -04:00

34 lines
514 B
TypeScript

/** @jsx jsx */
import { jsx } from 'slate-hyperscript'
export const input = (
<editor>
<element>word</element>
<selection>
<anchor path={[0, 0]} offset={0} />
<focus path={[0, 0]} offset={0} />
</selection>
</editor>
)
export const output = {
children: [
{
children: [
{
text: 'word',
},
],
},
],
selection: {
anchor: {
path: [0, 0],
offset: 0,
},
focus: {
path: [0, 0],
offset: 0,
},
},
}