diff options
author | Geireann <60007097+geireann@users.noreply.github.com> | 2021-09-23 11:18:30 -0400 |
---|---|---|
committer | Geireann <60007097+geireann@users.noreply.github.com> | 2021-09-23 11:18:30 -0400 |
commit | d5f9533d153e11e24d2ab7c03b4561170f0768fe (patch) | |
tree | b355c0362eb6b6576af5b5d149ef4ebe17225fc4 /src/client/views/nodes/button/FontIconBox.tsx | |
parent | 0079b81fdd56e8aac4ded4c82ecb013fe06057a2 (diff) |
small schema UI tweak
Diffstat (limited to 'src/client/views/nodes/button/FontIconBox.tsx')
-rw-r--r-- | src/client/views/nodes/button/FontIconBox.tsx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/views/nodes/button/FontIconBox.tsx b/src/client/views/nodes/button/FontIconBox.tsx index 511df8786..af4a581f1 100644 --- a/src/client/views/nodes/button/FontIconBox.tsx +++ b/src/client/views/nodes/button/FontIconBox.tsx @@ -861,4 +861,17 @@ Scripting.addGlobal(function toggleSchemaPreview(checkResult?: boolean) { selected.schemaPreviewWidth = 0; } } +}); + +/** STACK + * groupBy + */ +Scripting.addGlobal(function setGroupBy(key: string, checkResult?: boolean) { + SelectionManager.Docs().map(doc => doc._fontFamily = key); + const editorView = RichTextMenu.Instance.TextView?.EditorView; + if (checkResult) { + return StrCast((editorView ? RichTextMenu.Instance : Doc.UserDoc()).fontFamily); + } + if (editorView) RichTextMenu.Instance.setFontFamily(key); + else Doc.UserDoc().fontFamily = key; });
\ No newline at end of file |