diff --git a/ts/editor/ColorButtons.svelte b/ts/editor/ColorButtons.svelte
index d613191f9..0d5a0ae4a 100644
--- a/ts/editor/ColorButtons.svelte
+++ b/ts/editor/ColorButtons.svelte
@@ -12,6 +12,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import WithShortcut from "components/WithShortcut.svelte";
import { squareFillIcon } from "./icons";
+ import { appendInParentheses } from "./helpers";
import "./color.css";
@@ -36,7 +37,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{@html squareFillIcon}
@@ -47,7 +48,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
diff --git a/ts/editor/FormatInlineButtons.svelte b/ts/editor/FormatInlineButtons.svelte
index d4549d6d7..3abf51675 100644
--- a/ts/editor/FormatInlineButtons.svelte
+++ b/ts/editor/FormatInlineButtons.svelte
@@ -19,6 +19,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
subscriptIcon,
eraserIcon,
} from "./icons";
+ import { appendInParentheses } from "./helpers";
export let api = {};
@@ -32,7 +33,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:state={active}
let:updateState>
{
document.execCommand('bold');
@@ -53,7 +54,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:state={active}
let:updateState>
{
document.execCommand('italic');
@@ -74,7 +75,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:state={active}
let:updateState>
{
document.execCommand('underline');
@@ -98,7 +99,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:state={active}
let:updateState>
{
document.execCommand('superscript');
@@ -119,7 +120,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let:state={active}
let:updateState>
{
document.execCommand('subscript');
@@ -135,7 +136,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{
document.execCommand('removeFormat');
}}
diff --git a/ts/editor/TemplateButtons.svelte b/ts/editor/TemplateButtons.svelte
index cc2c0e4e4..bd426ea81 100644
--- a/ts/editor/TemplateButtons.svelte
+++ b/ts/editor/TemplateButtons.svelte
@@ -48,7 +48,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
+ on:click={onRecord}
+ on:mount={createShortcut}>
{@html micIcon}
@@ -70,8 +71,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
shortcut="Control+KeyM, KeyM"
let:createShortcut
let:shortcutLabel>
- wrap('\\(', '\\)')}>
+ wrap('\\(', '\\)')}
+ on:mount={createShortcut}>
{tr.editingMathjaxInline()}
+ {shortcutLabel}
@@ -79,8 +83,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
shortcut="Control+KeyM, KeyE"
let:createShortcut
let:shortcutLabel>
- wrap('\\[', '\\]')}>
+ wrap('\\[', '\\]')}
+ on:mount={createShortcut}>
{tr.editingMathjaxBlock()}
+ {shortcutLabel}
@@ -88,8 +95,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
shortcut="Control+KeyM, KeyC"
let:createShortcut
let:shortcutLabel>
- wrap('\\(\\ce{', '}\\)')}>
+ wrap('\\(\\ce{', '}\\)')}
+ on:mount={createShortcut}>
{tr.editingMathjaxChemistry()}
+ {shortcutLabel}
@@ -97,8 +107,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
shortcut="Control+KeyT, KeyT"
let:createShortcut
let:shortcutLabel>
- wrap('[latex]', '[/latex]')}>
+ wrap('[latex]', '[/latex]')}
+ on:mount={createShortcut}>
{tr.editingLatex()}
+ {shortcutLabel}
@@ -106,8 +119,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
shortcut="Control+KeyT, KeyE"
let:createShortcut
let:shortcutLabel>
- wrap('[$]', '[/$]')}>
+ wrap('[$]', '[/$]')}
+ on:mount={createShortcut}>
{tr.editingLatexEquation()}
+ {shortcutLabel}
@@ -115,8 +131,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
shortcut="Control+KeyT, KeyM"
let:createShortcut
let:shortcutLabel>
- wrap('[$$]', '[/$$]')}>
+ wrap('[$$]', '[/$$]')}
+ on:mount={createShortcut}>
{tr.editingLatexMathEnv()}
+ {shortcutLabel}
diff --git a/ts/sass/button_mixins.scss b/ts/sass/button_mixins.scss
index 0096bdca0..a7ee0f45e 100644
--- a/ts/sass/button_mixins.scss
+++ b/ts/sass/button_mixins.scss
@@ -7,10 +7,9 @@ $btn-base-color-day: white;
color: var(--text-fg);
background-color: $btn-base-color-day;
border-color: var(--medium-border) !important;
- margin-left: -1px;
}
-@mixin btn-day($with-disabled: true) {
+@mixin btn-day($with-disabled: true, $with-margin: true) {
.btn-day {
@include btn-day-base;
@content ($btn-base-color-day);
@@ -34,6 +33,10 @@ $btn-base-color-day: white;
box-shadow: none !important;
}
}
+
+ @if ($with-margin) {
+ margin-left: -1px;
+ }
}
}
@@ -43,10 +46,9 @@ $btn-base-color-night: #666;
color: var(--text-fg);
background-color: $btn-base-color-night;
border-color: $btn-base-color-night;
- margin-left: 1px;
}
-@mixin btn-night($with-disabled: true) {
+@mixin btn-night($with-disabled: true, $with-margin: true) {
.btn-night {
@include btn-night-base;
@content ($btn-base-color-night);
@@ -74,6 +76,10 @@ $btn-base-color-night: #666;
border-color: $btn-base-color-night !important;
}
}
+
+ @if ($with-margin) {
+ margin-left: 1px;
+ }
}
}