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:
@@ -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>
|
||||
)
|
||||
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user