aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/RichTextMenu.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-22 12:43:28 -0400
committerbobzel <zzzman@gmail.com>2021-09-22 12:43:28 -0400
commitc5dff2f99eeee744c7be903a7127b283b8c7fbf8 (patch)
tree67a37c8755278a759d6cdad29dafddf7bf8ae9b8 /src/client/views/nodes/formattedText/RichTextMenu.tsx
parent13ec8c89d7fb809a9ceefa3c25e332b0f4457593 (diff)
fixed problem with fontsize corruption. fixed showing correct font size when creating a new empty document with storedMarks. fixed color of previewcursor in dark mode.
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextMenu.tsx')
-rw-r--r--src/client/views/nodes/formattedText/RichTextMenu.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextMenu.tsx b/src/client/views/nodes/formattedText/RichTextMenu.tsx
index 3efc46259..bd05af977 100644
--- a/src/client/views/nodes/formattedText/RichTextMenu.tsx
+++ b/src/client/views/nodes/formattedText/RichTextMenu.tsx
@@ -188,11 +188,10 @@ export class RichTextMenu extends AntimodeMenu<AntimodeMenuProps> {
if (this.TextView.props.isSelected(true)) {
const state = this.view.state;
const pos = this.view.state.selection.$from;
- const marks: Mark<any>[] = [];
+ const marks: Mark<any>[] = [...(state.storedMarks ?? [])];
if (state.selection.empty) {
const ref_node = this.reference_node(pos);
- marks.push(...[...(ref_node !== this.view.state.doc && ref_node?.isText ?
- [...(state.storedMarks ?? []), ...Array.from(ref_node.marks)] : [])]);
+ marks.push(...(ref_node !== this.view.state.doc && ref_node?.isText ? Array.from(ref_node.marks) : []));
} else {
state.doc.nodesBetween(state.selection.from, state.selection.to, (node, pos, parent, index) => {
node.marks?.filter(mark => !mark.isInSet(marks)).map(mark => marks.push(mark));