aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/marks_rts.ts
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2021-09-23 15:09:32 -0400
committerGitHub <noreply@github.com>2021-09-23 15:09:32 -0400
commit281ea90236adb8cb3ff8db7ddc76a466a8641bcd (patch)
treebe9a5086596e33c269857c9ead0293719786035e /src/client/views/nodes/formattedText/marks_rts.ts
parent26e265c6fc4950b859724aa2c0fbe6a028a56bfc (diff)
parentd5f9533d153e11e24d2ab7c03b4561170f0768fe (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.ts6
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 */