mirror of
https://github.com/cudr/slate-collaborative.git
synced 2025-06-13 04:44:08 +00:00
fix: remove marks
This commit is contained in:
parent
b3ddf5dc26
commit
07a8201215
@ -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: '!',
|
||||||
|
@ -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 = (
|
||||||
|
@ -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: []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user