diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2021-09-23 15:09:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 15:09:32 -0400 |
commit | 281ea90236adb8cb3ff8db7ddc76a466a8641bcd (patch) | |
tree | be9a5086596e33c269857c9ead0293719786035e /src/client/views/nodes/formattedText/marks_rts.ts | |
parent | 26e265c6fc4950b859724aa2c0fbe6a028a56bfc (diff) | |
parent | d5f9533d153e11e24d2ab7c03b4561170f0768fe (diff) |
Merge branch 'master' into linking-anh
Diffstat (limited to 'src/client/views/nodes/formattedText/marks_rts.ts')
-rw-r--r-- | src/client/views/nodes/formattedText/marks_rts.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/marks_rts.ts b/src/client/views/nodes/formattedText/marks_rts.ts index 655ee7e44..6103a28d6 100644 --- a/src/client/views/nodes/formattedText/marks_rts.ts +++ b/src/client/views/nodes/formattedText/marks_rts.ts @@ -61,13 +61,13 @@ export const marks: { [index: string]: MarkSpec } = { /** FONT SIZES */ pFontSize: { - attrs: { fontSize: { default: 10 } }, + attrs: { fontSize: { default: "10px" } }, parseDOM: [{ tag: "span", getAttrs(dom: any) { - return { fontSize: dom.style.fontSize ? Number(dom.style.fontSize.replace("px", "")) : "" }; + return { fontSize: dom.style.fontSize ? dom.style.fontSize.toString() : "" }; } }], - toDOM: (node) => node.attrs.fontSize ? ['span', { style: `font-size: ${node.attrs.fontSize}px;` }] : ['span', 0] + toDOM: (node) => node.attrs.fontSize ? ['span', { style: `font-size: ${node.attrs.fontSize};` }] : ['span', 0] }, /* FONTS */ |