mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 12:30:11 +02:00
* Run mocha test with module alias * Running test with babel module alias * Fix model alias * Fix model alias * Resolve module alias * Running test with babel module alias * Connect to codecov * add codecov to travis * stop if yarn test has errors * Still cannot collect data from slate modules * Try to check whether it works with codecov * Move config to nycrc * Remove nyc require * Update nyc to use src * better before_script
88 lines
1.5 KiB
JavaScript
88 lines
1.5 KiB
JavaScript
/** @jsx h */
|
|
|
|
import h from 'slate-hyperscript'
|
|
|
|
export const input = (
|
|
<value>
|
|
<document>
|
|
<block type="paragraph">
|
|
one
|
|
<mark type="bold">
|
|
t<cursor />wo
|
|
</mark>
|
|
three
|
|
</block>
|
|
</document>
|
|
</value>
|
|
)
|
|
|
|
export const options = {
|
|
preserveSelection: true,
|
|
preserveKeys: true,
|
|
}
|
|
|
|
export const output = {
|
|
object: 'value',
|
|
document: {
|
|
object: 'document',
|
|
data: {},
|
|
key: '3',
|
|
nodes: [
|
|
{
|
|
object: 'block',
|
|
key: '1',
|
|
type: 'paragraph',
|
|
isVoid: false,
|
|
data: {},
|
|
nodes: [
|
|
{
|
|
object: 'text',
|
|
key: '0',
|
|
leaves: [
|
|
{
|
|
object: 'leaf',
|
|
text: 'one',
|
|
marks: [],
|
|
},
|
|
{
|
|
object: 'leaf',
|
|
text: 'two',
|
|
marks: [
|
|
{
|
|
object: 'mark',
|
|
type: 'bold',
|
|
data: {},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
object: 'leaf',
|
|
text: 'three',
|
|
marks: [],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
selection: {
|
|
object: 'range',
|
|
anchor: {
|
|
object: 'point',
|
|
key: '0',
|
|
path: [0, 0],
|
|
offset: 4,
|
|
},
|
|
focus: {
|
|
object: 'point',
|
|
key: '0',
|
|
path: [0, 0],
|
|
offset: 4,
|
|
},
|
|
isFocused: true,
|
|
isAtomic: false,
|
|
marks: null,
|
|
},
|
|
}
|