From 631006eb233e901d8c18bed936b4d160cbbd7cb6 Mon Sep 17 00:00:00 2001 From: bob Date: Wed, 29 Jan 2020 14:18:19 -0500 Subject: switched inline sidebars back to ##, made text size setting available anywhere in text with % --- src/client/util/RichTextRules.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/util/RichTextRules.ts b/src/client/util/RichTextRules.ts index cdf7831a9..d00921626 100644 --- a/src/client/util/RichTextRules.ts +++ b/src/client/util/RichTextRules.ts @@ -65,7 +65,7 @@ export const inpRules = { // set the font size using # new InputRule( - new RegExp(/^%([0-9]+)\s$/), + new RegExp(/%([0-9]+)\s$/), (state, match, start, end) => { const size = Number(match[1]); return state.tr.deleteRange(start, end).addStoredMark(schema.marks.pFontSize.create({ fontSize: size })); @@ -78,7 +78,7 @@ export const inpRules = { const fieldView = state.schema.nodes.dashField.create({ fieldKey: match[1] }); return state.tr.deleteRange(start, end).insert(start, fieldView); }), - // create a text display of a metadata field + // create a text display of a metadata field on another document new InputRule( new RegExp(/\[\[([a-zA-Z_ \-0-9]+):([a-zA-Z_ \-0-9]+)\]\]$/), (state, match, start, end) => { @@ -204,7 +204,7 @@ export const inpRules = { return replaced.setSelection(new TextSelection(replaced.doc.resolve(end - 2))); }), new InputRule( - new RegExp(/%#$/), + new RegExp(/##$/), (state, match, start, end) => { const textDoc = Doc.GetProto(Cast((schema as any).Document[DataSym], Doc, null)!); const numInlines = NumCast(textDoc.inlineTextCount); -- cgit v1.2.3-70-g09d2