diff options
author | bob <bcz@cs.brown.edu> | 2019-12-06 15:00:33 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-12-06 15:00:33 -0500 |
commit | fef12d4ca96d35c230a3a5e7c053b9b90eb38243 (patch) | |
tree | c4348feb35322dc404fca87d0c9a327490c43548 /src/client/util/RichTextRules.ts | |
parent | 4acdd89394aecf27393f3e88a0783fadfe4bf394 (diff) |
more fixes for inline comments.
Diffstat (limited to 'src/client/util/RichTextRules.ts')
-rw-r--r-- | src/client/util/RichTextRules.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/util/RichTextRules.ts b/src/client/util/RichTextRules.ts index 4e3192dd4..cd4bfdc63 100644 --- a/src/client/util/RichTextRules.ts +++ b/src/client/util/RichTextRules.ts @@ -174,7 +174,7 @@ export const inpRules = { const newNode = schema.nodes.dashComment.create({ docid: target[Id] }); const dashDoc = schema.nodes.dashDoc.create({ width: 75, height: 35, title: "dashDoc", docid: target[Id], float: "right" }); const sm = state.storedMarks || undefined; - const replaced = node ? state.tr.insert(start, newNode).replaceRangeWith(start + 1, end + 1, dashDoc).setStoredMarks([...node.marks, ...(sm ? sm : [])]) : + const replaced = node ? state.tr.insert(start, newNode).replaceRangeWith(start + 1, end + 1, dashDoc).insertText(" ", start + 2).setStoredMarks([...node.marks, ...(sm ? sm : [])]) : state.tr; return replaced;//.setSelection(new NodeSelection(replaced.doc.resolve(end))); }), |