aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/DocumentView.tsx1
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 7683ad269..fb97c18c3 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -914,7 +914,6 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
const borderRounding = this.layoutDoc.borderRounding;
const localScale = fullDegree;
- console.log("Background = " + this.props.Document.title + " " + finalColor);
const highlightColors = Cast(Doc.UserDoc().activeWorkspace, Doc, null)?.darkScheme ?
["transparent", "#65350c", "#65350c", "yellow", "magenta", "cyan", "orange"] :
["transparent", "maroon", "maroon", "yellow", "magenta", "cyan", "orange"];
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 3567dbbd5..b2458ea1d 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -95,6 +95,7 @@ export class FormattedTextBox extends DocAnnotatableComponent<(FieldViewProps &
public static FocusedBox: FormattedTextBox | undefined;
public static SelectOnLoad = "";
+ public static SelectOnLoadChar = "";
public static IsFragment(html: string) {
return html.indexOf("data-pm-slice") !== -1;
}
@@ -474,7 +475,7 @@ export class FormattedTextBox extends DocAnnotatableComponent<(FieldViewProps &
_keymap: any = undefined;
_rules: RichTextRules | undefined;
@computed get config() {
- this._keymap = buildKeymap(schema);
+ this._keymap = buildKeymap(schema, this.props);
this._rules = new RichTextRules(this.props.Document, this);
return {
schema,
@@ -796,6 +797,9 @@ export class FormattedTextBox extends DocAnnotatableComponent<(FieldViewProps &
if (selectOnLoad) {
FormattedTextBox.SelectOnLoad = "";
this.props.select(false);
+ FormattedTextBox.SelectOnLoadChar && this._editorView!.dispatch(this._editorView!.state.tr.insertText(FormattedTextBox.SelectOnLoadChar));
+ FormattedTextBox.SelectOnLoadChar = "";
+
}
(selectOnLoad /* || !rtfField?.Text*/) && this._editorView!.focus();
// add user mark for any first character that was typed since the user mark that gets set in KeyPress won't have been called yet.