diff options
author | bob <bcz@cs.brown.edu> | 2019-12-20 13:50:36 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-12-20 13:50:36 -0500 |
commit | e8606ffee44b934deea5878afd110e39ec1ae63c (patch) | |
tree | 443cb591aa7fb81ce52d8cfe039e0f8f86b2627b /src/client/util/RichTextRules.ts | |
parent | c5aeb7cd6194c593c250060f9571ba067b20da68 (diff) |
fixed nested text box to stopPropagation on key press to prevent backscpace from deleting everything. made Esc desleect text and the document. fixed jumpToDOcument to focus annotationOn documents properly (particularly for sidebar text notes). fixed deselecting docsin textbox sidebar.
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 62b20b3fa..5148af889 100644 --- a/src/client/util/RichTextRules.ts +++ b/src/client/util/RichTextRules.ts @@ -220,7 +220,7 @@ export const inpRules = { new InputRule( new RegExp(/%#$/), (state, match, start, end) => { - const target = Docs.Create.TextDocument({ width: 75, height: 35, backgroundColor: "yellow", autoHeight: true, fontSize: 9, title: "inline comment" }); + const target = Docs.Create.TextDocument({ width: 75, height: 35, backgroundColor: "yellow", annotationOn: FormattedTextBox.FocusedBox!.dataDoc, autoHeight: true, fontSize: 9, title: "inline comment" }); const node = (state.doc.resolve(start) as any).nodeAfter; 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" }); |