1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-17 12:41:44 +02:00

remove leaves (#2715)

* first stab at removing leaves with tests passing

* add deprecation warning for creating texts with leaves

* fixes

* update examples
This commit is contained in:
Ian Storm Taylor
2019-04-30 12:15:22 -07:00
committed by GitHub
parent a431576e73
commit a220cd5ae1
184 changed files with 2281 additions and 2599 deletions

View File

@@ -36,7 +36,7 @@ export const value = (
<document>
<paragraph>
<text key="a">
<anchor />
<anchor isFocused={false} />
</text>
</paragraph>
<image src="https://example.com/image.png">
@@ -44,17 +44,13 @@ export const value = (
</image>
<paragraph>
<text key="b">
<focus />
<focus isFocused={false} />
</text>
</paragraph>
<image src="https://example.com/image2.png">
<text />
</image>
</document>
<selection isFocused={false}>
<anchor key="a" offset={0} />
<focus key="b" offset={0} />
</selection>
</value>
)

View File

@@ -37,11 +37,15 @@ export const output = `
<span data-slate-leaf="true">
<span data-slate-content="true">one</span>
</span>
</span>
<span>
<span data-slate-leaf="true">
<strong data-slate-mark="true">
<span data-slate-content="true">two</span>
</strong>
</span>
</span>
<span>
<span data-slate-leaf="true">
<span data-slate-content="true">three</span>
</span>