From d6d3ed96369df4416d5ae03dcdf367331929ebee Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 22 Jan 2023 15:48:12 +0100 Subject: [PATCH] Fixes #326 --- web/editor.tsx | 7 +++++++ web/types.ts | 2 +- website/CHANGELOG.md | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/web/editor.tsx b/web/editor.tsx index 98ae635..13d08c3 100644 --- a/web/editor.tsx +++ b/web/editor.tsx @@ -315,6 +315,13 @@ export class Editor { } }); + if (this.builtinSettings.fontFamily) { + document.getElementById("sb-root")!.setAttribute( + "style", + `--editor-font: ${this.builtinSettings.fontFamily};`, + ); + } + await this.dispatchAppEvent("editor:init"); } diff --git a/web/types.ts b/web/types.ts index 56beca3..1001e94 100644 --- a/web/types.ts +++ b/web/types.ts @@ -14,7 +14,7 @@ export type PanelMode = number; export type BuiltinSettings = { indexPage: string; - syncUrl?: string; + fontFamily?: string; }; export type PanelConfig = { diff --git a/website/CHANGELOG.md b/website/CHANGELOG.md index d618851..7287038 100644 --- a/website/CHANGELOG.md +++ b/website/CHANGELOG.md @@ -3,10 +3,11 @@ release. --- -## Next +## 0.2.9 * Fixed copy & paste, drag & drop of attachments in the [[Desktop]] app * Continuous [[Sync]] * Support for embedding [[Markdown/Code Widgets]]. +* Ability to set the editor font via the `fontFamily` setting in [[SETTINGS]] (restart the app/reload the page to make it go into effect). --- ## 0.2.8