diff --git a/ts/editor/editor-toolbar/BoldButton.svelte b/ts/editor/editor-toolbar/BoldButton.svelte
index 76d34ad4f..83cec1183 100644
--- a/ts/editor/editor-toolbar/BoldButton.svelte
+++ b/ts/editor/editor-toolbar/BoldButton.svelte
@@ -4,20 +4,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
-
- {
- makeBold();
- updateState(event);
- }}
- >
- {@html boldIcon}
-
-
- {
- makeBold();
- updateState(event);
- }}
- />
-
+
+ {@html boldIcon}
+
diff --git a/ts/editor/editor-toolbar/ItalicButton.svelte b/ts/editor/editor-toolbar/ItalicButton.svelte
index 730670729..d2a7105c2 100644
--- a/ts/editor/editor-toolbar/ItalicButton.svelte
+++ b/ts/editor/editor-toolbar/ItalicButton.svelte
@@ -4,20 +4,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
-
- {
- makeItalic();
- updateState(event);
- }}
- >
- {@html italicIcon}
-
-
- {
- makeItalic();
- updateState(event);
- }}
- />
-
+
+ {@html italicIcon}
+
diff --git a/ts/editor/editor-toolbar/SubscriptButton.svelte b/ts/editor/editor-toolbar/SubscriptButton.svelte
index 5e27e490f..81bb7c1de 100644
--- a/ts/editor/editor-toolbar/SubscriptButton.svelte
+++ b/ts/editor/editor-toolbar/SubscriptButton.svelte
@@ -4,21 +4,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
-
- {
- makeSub();
- updateState(event);
- updateStateByKey("superscript", event);
- }}
- >
- {@html subscriptIcon}
-
-
- {
- makeSub();
- updateState(event);
- updateStateByKey("superscript", event);
- }}
- />
-
+
+ {@html subscriptIcon}
+
diff --git a/ts/editor/editor-toolbar/SuperscriptButton.svelte b/ts/editor/editor-toolbar/SuperscriptButton.svelte
index 25988dde1..f4bd0ec1d 100644
--- a/ts/editor/editor-toolbar/SuperscriptButton.svelte
+++ b/ts/editor/editor-toolbar/SuperscriptButton.svelte
@@ -4,21 +4,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
-
- {
- makeSuper();
- updateState(event);
- updateStateByKey("subscript", event);
- }}
- >
- {@html superscriptIcon}
-
-
- {
- makeSuper();
- updateState(event);
- updateStateByKey("subscript", event);
- }}
- />
-
+
+ {@html superscriptIcon}
+
diff --git a/ts/editor/editor-toolbar/TextAttributeButton.svelte b/ts/editor/editor-toolbar/TextAttributeButton.svelte
new file mode 100644
index 000000000..4771286ad
--- /dev/null
+++ b/ts/editor/editor-toolbar/TextAttributeButton.svelte
@@ -0,0 +1,81 @@
+
+
+
+
+ {
+ applyAttribute();
+ updateState(event);
+ exclusiveNames.map((name) => updateStateByKey(name, event));
+ }}
+ >
+
+
+
+ {
+ applyAttribute();
+ updateState(event);
+ exclusiveNames.map((name) => updateStateByKey(name, event));
+ }}
+ />
+
diff --git a/ts/editor/editor-toolbar/UnderlineButton.svelte b/ts/editor/editor-toolbar/UnderlineButton.svelte
index c50acbf3d..117c34978 100644
--- a/ts/editor/editor-toolbar/UnderlineButton.svelte
+++ b/ts/editor/editor-toolbar/UnderlineButton.svelte
@@ -4,86 +4,24 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
-
- {
- makeUnderline();
- updateState(event);
- }}
- >
- {@html underlineIcon}
-
-
- {
- makeUnderline();
- updateState(event);
- }}
- />
-
+
+ {@html underlineIcon}
+