aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-09-10 15:58:09 -0400
committerbobzel <zzzman@gmail.com>2023-09-10 15:58:09 -0400
commit6499ac4b30c8f6ada2b0c7d74cd5f2a73f9bf180 (patch)
treea6262cc5fad835bd8ea8a4e2c68633885866b559 /src/client/views/nodes/formattedText
parent942669b287a8aacc3f4c803beb450a7e3ae8b565 (diff)
fixes for file uploads: restored progress for youtube videos, fixed info display on loadingBoxes, stop client from asking for progress on failed uploads. attempt to catch stream errors on webpages. fixed dataFieldView in text to print out layout document's field, not field of document that contains the field definition.
Diffstat (limited to 'src/client/views/nodes/formattedText')
-rw-r--r--src/client/views/nodes/formattedText/RichTextRules.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextRules.ts b/src/client/views/nodes/formattedText/RichTextRules.ts
index 5d92f63ef..3e2afd2ce 100644
--- a/src/client/views/nodes/formattedText/RichTextRules.ts
+++ b/src/client/views/nodes/formattedText/RichTextRules.ts
@@ -279,12 +279,9 @@ export class RichTextRules {
const num = value.match(/^[0-9.]$/);
this.Document[DocData][fieldKey] = value === 'true' ? true : value === 'false' ? false : num ? Number(value) : value;
}
- const target = DocServer.FindDocByTitle(docTitle) ?? this.Document;
- if (target) {
- const fieldView = state.schema.nodes.dashField.create({ fieldKey, docId: target[Id], hideKey: false });
- return state.tr.setSelection(new TextSelection(state.doc.resolve(start), state.doc.resolve(end))).replaceSelectionWith(fieldView, true);
- }
- return state.tr;
+ const target = DocServer.FindDocByTitle(docTitle);
+ const fieldView = state.schema.nodes.dashField.create({ fieldKey, docId: target?.[Id], hideKey: false });
+ return state.tr.setSelection(new TextSelection(state.doc.resolve(start), state.doc.resolve(end))).replaceSelectionWith(fieldView, true);
}),
// create a text display of a metadata field on this or another document, or create a hyperlink portal to another document