fix: garbage cursors on client

This commit is contained in:
cudr
2019-10-27 17:15:16 +03:00
parent 8d7a10be1b
commit eccece2740
3 changed files with 47 additions and 6 deletions

View File

@@ -7,15 +7,18 @@ export const createTextJSON = (text: string = ''): TextJSON => ({
text
})
export const createParagraphJSON = (text: string = ''): NodeJSON => ({
export const createBlockJSON = (
type: string = 'paragraph',
text: string = ''
): NodeJSON => ({
object: 'block',
type: 'paragraph',
type,
nodes: [createTextJSON(text)]
})
export const createValueJSON = (): ValueJSON => ({
document: {
nodes: [createParagraphJSON()]
nodes: [createBlockJSON()]
}
})