1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 02:49:56 +02:00

remove marks, in favor of text properties (#3235)

* remove marks, in favor of text properties

* fix lint

* fix more examples

* update docs
This commit is contained in:
Ian Storm Taylor
2019-12-05 11:21:15 -05:00
committed by GitHub
parent 31df397930
commit 4c03b497d9
205 changed files with 792 additions and 4208 deletions

View File

@@ -1,22 +0,0 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
editor.exec({ type: 'add_mark', mark: { key: 'a' } })
}
export const input = (
<editor>
<block>
o<anchor />
ne
</block>
<block>
tw
<focus />o
</block>
</editor>
)
export const output = input

View File

@@ -1,20 +0,0 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
editor.exec({ type: 'add_mark', mark: { key: 'a' } })
}
export const input = (
<editor>
<block>
<mark key="b">
w<anchor />o
</mark>
r<focus />d
</block>
</editor>
)
export const output = input

View File

@@ -1,20 +0,0 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
editor.exec({ type: 'add_mark', mark: { key: 'a' } })
}
export const input = (
<editor>
<block>
<mark key="a">
w<anchor />o
</mark>
r<focus />d
</block>
</editor>
)
export const output = input

View File

@@ -1,20 +0,0 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
editor.exec({ type: 'add_mark', mark: { key: 'a' } })
}
export const input = (
<editor>
<block>
<anchor />
wo
<focus />
rd
</block>
</editor>
)
export const output = input

View File

@@ -1,27 +0,0 @@
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../..'
export const run = editor => {
editor.delete()
}
export const input = (
<editor>
<block>
<mark key="a">
on
<anchor />e
</mark>
<mark key="c">
tw
<focus />o
</mark>
</block>
</editor>
)
export const output = input
export const skip = true

View File

@@ -1,21 +0,0 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
editor.exec({ type: 'remove_mark', mark: { key: true } })
}
export const input = (
<editor>
<block>
<mark key>
<anchor />
one
<focus />
</mark>
</block>
</editor>
)
export const output = input