diff options
author | bobzel <zzzman@gmail.com> | 2022-10-07 15:03:16 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-10-07 15:03:16 -0400 |
commit | 0e41cb323c486b23c70e53d14a563adaf0eeef9e (patch) | |
tree | 3cc353c16996c58709cdf5ec8ca8fbe88fe6bb89 /src/client/views/nodes/formattedText/nodes_rts.ts | |
parent | 69eb6d5514c36bd7065d2702cb2fb71e62c039ff (diff) |
fixes for equations : :eq as option to ctrl-m inside a text box. added background for equations. fixed cursor focus issues.
Diffstat (limited to 'src/client/views/nodes/formattedText/nodes_rts.ts')
-rw-r--r-- | src/client/views/nodes/formattedText/nodes_rts.ts | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/client/views/nodes/formattedText/nodes_rts.ts b/src/client/views/nodes/formattedText/nodes_rts.ts index 5142b7da6..66d747bf7 100644 --- a/src/client/views/nodes/formattedText/nodes_rts.ts +++ b/src/client/views/nodes/formattedText/nodes_rts.ts @@ -157,6 +157,18 @@ export const nodes: { [index: string]: NodeSpec } = { }, }, + equation: { + inline: true, + attrs: { + fieldKey: { default: '' }, + }, + group: 'inline', + toDOM(node) { + const attrs = { style: `width: ${node.attrs.width}, height: ${node.attrs.height}` }; + return ['div', { ...node.attrs, ...attrs }]; + }, + }, + // :: NodeSpec The text node. text: { group: 'inline', @@ -260,20 +272,6 @@ export const nodes: { [index: string]: NodeSpec } = { }, }, - equation: { - inline: true, - attrs: { - fieldKey: { default: '' }, - }, - atom: true, - group: 'inline', - draggable: false, - toDOM(node) { - const attrs = { style: `width: ${node.attrs.width}, height: ${node.attrs.height}` }; - return ['div', { ...node.attrs, ...attrs }]; - }, - }, - video: { inline: true, attrs: { |