diff options
| author | bobzel <zzzman@gmail.com> | 2023-04-26 16:03:49 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-04-26 16:03:49 -0400 |
| commit | 1150296b546bb3628c3dac5704150dfb4295434b (patch) | |
| tree | 672c4a33a6c248eae98bb6c0f6ae8c073ab05313 /src/client/views/nodes/formattedText/RichTextRules.ts | |
| parent | f885965824f76be69e6bd26109a5df85dc43eb80 (diff) | |
added cheatsheet and shortcut for viewing text shortcuts. changed menu organization slightly for viewability.
Diffstat (limited to 'src/client/views/nodes/formattedText/RichTextRules.ts')
| -rw-r--r-- | src/client/views/nodes/formattedText/RichTextRules.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/views/nodes/formattedText/RichTextRules.ts b/src/client/views/nodes/formattedText/RichTextRules.ts index 599f96bca..20ce929ad 100644 --- a/src/client/views/nodes/formattedText/RichTextRules.ts +++ b/src/client/views/nodes/formattedText/RichTextRules.ts @@ -8,6 +8,7 @@ import { normalizeEmail } from '../../../../fields/util'; import { Utils } from '../../../../Utils'; import { DocServer } from '../../../DocServer'; import { Docs, DocUtils } from '../../../documents/Documents'; +import { RTFMarkup } from '../../../util/RTFMarkup'; import { FormattedTextBox } from './FormattedTextBox'; import { wrappingInputRule } from './prosemirrorPatches'; import { RichTextMenu } from './RichTextMenu'; @@ -228,6 +229,12 @@ export class RichTextRules { return null; }), + // show markup help + new InputRule(new RegExp(/%\?$/), (state, match, start, end) => { + setTimeout(RTFMarkup.Instance.open); + return state.tr.deleteRange(start, end); + }), + // stop using active style new InputRule(new RegExp(/%alt$/), (state, match, start, end) => { setTimeout(() => (this.Document[this.TextBox.props.fieldKey + '-usePath'] = this.Document[this.TextBox.props.fieldKey + '-usePath'] ? undefined : 'alternate')); |
