fix: remove marks

This commit is contained in:
Eric Maciel 2020-10-28 16:29:49 -04:00
parent b3ddf5dc26
commit 07a8201215
3 changed files with 2 additions and 7 deletions

View File

@ -10,21 +10,18 @@ const transforms = [
[createNode('paragraph', '')], [createNode('paragraph', '')],
[ [
{ {
marks: [],
offset: 0, offset: 0,
path: [0, 0], path: [0, 0],
text: 'Hello ', text: 'Hello ',
type: 'insert_text' type: 'insert_text'
}, },
{ {
marks: [],
offset: 6, offset: 6,
path: [0, 0], path: [0, 0],
text: 'collaborator', text: 'collaborator',
type: 'insert_text' type: 'insert_text'
}, },
{ {
marks: [],
offset: 18, offset: 18,
path: [0, 0], path: [0, 0],
text: '!', text: '!',

View File

@ -8,8 +8,7 @@ const insertTextOp = ({ index, path, value }: Automerge.Diff) => () => ({
type: 'insert_text', type: 'insert_text',
path: toSlatePath(path), path: toSlatePath(path),
offset: index, offset: index,
text: value, text: value
marks: []
}) })
const insertNodeOp = ( const insertNodeOp = (

View File

@ -29,8 +29,7 @@ const removeTextOp = (op: Automerge.Diff) => (map: any, doc: Element) => {
type: 'remove_text', type: 'remove_text',
path: slatePath, path: slatePath,
offset: index, offset: index,
text, text
marks: []
} }
} }