aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/button/FontIconBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-24 09:10:57 -0400
committerbobzel <zzzman@gmail.com>2021-09-24 09:10:57 -0400
commit851647c8d399dc6e5d036ac11cbce4e8dd8c2eb9 (patch)
tree6aadfb3e43882bcf1e7532c2f57eeb4be33b28ea /src/client/views/nodes/button/FontIconBox.tsx
parenta4b3114f3792c80e20a3f40053ec4724729c1100 (diff)
parent643df77e6366b7164307ffe195ed9de83b68e5ae (diff)
Merge branch 'master' into temporalmedia-mehek
Diffstat (limited to 'src/client/views/nodes/button/FontIconBox.tsx')
-rw-r--r--src/client/views/nodes/button/FontIconBox.tsx15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/client/views/nodes/button/FontIconBox.tsx b/src/client/views/nodes/button/FontIconBox.tsx
index 511df8786..f975b063a 100644
--- a/src/client/views/nodes/button/FontIconBox.tsx
+++ b/src/client/views/nodes/button/FontIconBox.tsx
@@ -335,7 +335,7 @@ export class FontIconBox extends DocComponent<ButtonProps, FontIconDocument>(Fon
return <SketchPicker
onChange={change}
color={curColor}
- presetColors={presets} />
+ presetColors={presets} />;
}
/**
* Color button
@@ -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