aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-06-23 21:14:34 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-06-23 21:14:34 -0400
commit818d3a367648f7dbb279e13aa197ffbae412fbd0 (patch)
treeceb2def99c4060fcc7113cd3ed2a7df169512aa2
parent73b3304d0865fc34ad1f21af2bbca20a3eca8a8a (diff)
added arbitrary font size mark
-rw-r--r--src/client/util/RichTextSchema.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 820d17a14..f3f6655af 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -350,6 +350,16 @@ export const marks: { [index: string]: MarkSpec } = {
/** FONT SIZES */
+ pFontSize: {
+ attrs: {
+ fontSize: { default: 10 }
+ },
+ inclusive: false,
+ parseDOM: [{ style: 'font-size: 10px;' }],
+ toDOM: (node) => ['span', {
+ style: `font-size: ${node.attrs.fontSize}px;`
+ }]
+ },
p10: {
parseDOM: [{ style: 'font-size: 10px;' }],