diff --git a/ts/lib/editable/mathjax-element.svelte.ts b/ts/lib/editable/mathjax-element.svelte.ts
index c53844710..bea0390c7 100644
--- a/ts/lib/editable/mathjax-element.svelte.ts
+++ b/ts/lib/editable/mathjax-element.svelte.ts
@@ -22,9 +22,9 @@ function trimBreaks(text: string): string {
.replace(/\n*$/, "");
}
-export const mathjaxConfig = {
+export const mathjaxConfig = $state({
enabled: true,
-};
+});
interface MathjaxProps {
mathjax: string;
diff --git a/ts/routes/editor/EditorField.svelte b/ts/routes/editor/EditorField.svelte
index c7f6fb9d8..da04d2627 100644
--- a/ts/routes/editor/EditorField.svelte
+++ b/ts/routes/editor/EditorField.svelte
@@ -6,6 +6,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { Readable } from "svelte/store";
import type { EditingAreaAPI } from "./EditingArea.svelte";
+ import { mathjaxConfig } from "$lib/editable/mathjax-element.svelte";
export interface FieldData {
name: string;
@@ -117,13 +118,15 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
fontSize={field.fontSize}
api={editingArea}
>
- {#if flipInputs}
-
-
- {:else}
-
-
- {/if}
+ {#key mathjaxConfig.enabled}
+ {#if flipInputs}
+
+
+ {:else}
+
+
+ {/if}
+ {/key}
diff --git a/ts/routes/editor/editor-toolbar/OptionsButton.svelte b/ts/routes/editor/editor-toolbar/OptionsButton.svelte
index 7be70076a..952837fbb 100644
--- a/ts/routes/editor/editor-toolbar/OptionsButton.svelte
+++ b/ts/routes/editor/editor-toolbar/OptionsButton.svelte
@@ -34,7 +34,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
bridgeCommand("toggleMathjax");
} else {
setColConfig("renderMathjax", mathjaxConfig.enabled);
- // FIXME: refresh
}
}