mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-03-10 00:10:18 +01:00
* rename `kind` to `object` for clarity * add deprecation warning for direct access * add deprecation warning for node creation
38 lines
494 B
JavaScript
38 lines
494 B
JavaScript
|
|
/** @jsx h */
|
|
|
|
import h from '../helpers/h'
|
|
|
|
export const config = {
|
|
rules: [
|
|
{
|
|
deserialize(el, next) {
|
|
return {
|
|
object: 'block',
|
|
type: 'paragraph',
|
|
}
|
|
}
|
|
},
|
|
{
|
|
deserialize(el, next) {
|
|
return {
|
|
object: 'block',
|
|
type: 'quote',
|
|
}
|
|
}
|
|
},
|
|
]
|
|
}
|
|
|
|
export const input = `
|
|
<p>one</p>
|
|
`.trim()
|
|
|
|
export const output = (
|
|
<value>
|
|
<document>
|
|
<paragraph />
|
|
</document>
|
|
</value>
|
|
)
|