aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextRules.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-01-23 18:24:38 -0500
committerbob <bcz@cs.brown.edu>2020-01-23 18:24:38 -0500
commitc23d9ba83c87511a626bfe8d1da5dd981e311262 (patch)
tree05f156e7cefcb12ce24a242a4d16b17f0f1c3882 /src/client/util/RichTextRules.ts
parent0142f4e14cc8e291ee5acbae3cc4b81c95c4634a (diff)
got rid of extension docs. changed layout-specific keys to start with "_" which flags them to be written to the current layout document
Diffstat (limited to 'src/client/util/RichTextRules.ts')
-rw-r--r--src/client/util/RichTextRules.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/RichTextRules.ts b/src/client/util/RichTextRules.ts
index 0ee9481f0..fb22e0d18 100644
--- a/src/client/util/RichTextRules.ts
+++ b/src/client/util/RichTextRules.ts
@@ -79,7 +79,7 @@ export const inpRules = {
const value = state.doc.textBetween(start, end);
if (value) {
DocServer.GetRefField(value).then(docx => {
- const target = ((docx instanceof Doc) && docx) || Docs.Create.FreeformDocument([], { title: value, width: 500, height: 500, }, value);
+ const target = ((docx instanceof Doc) && docx) || Docs.Create.FreeformDocument([], { title: value, _width: 500, _height: 500, }, value);
DocUtils.Publish(target, value, returnFalse, returnFalse);
DocUtils.MakeLink({ doc: (schema as any).Document }, { doc: target }, "portal link", "");
});
@@ -196,7 +196,7 @@ export const inpRules = {
new InputRule(
new RegExp(/%#$/),
(state, match, start, end) => {
- const target = Docs.Create.TextDocument({ width: 75, height: 35, backgroundColor: "yellow", annotationOn: FormattedTextBox.FocusedBox!.dataDoc, 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" });