diff --git a/ts/editor/BUILD.bazel b/ts/editor/BUILD.bazel index 16aa2de1d..805ba9e27 100644 --- a/ts/editor/BUILD.bazel +++ b/ts/editor/BUILD.bazel @@ -180,6 +180,7 @@ svelte_check( "//ts/sass:button_mixins_lib", "//ts/sass/bootstrap", "//ts/components:svelte_components", + "//ts/components", "@npm//@types/bootstrap", ], ) diff --git a/ts/editor/TemplateButtons.svelte b/ts/editor/TemplateButtons.svelte index 5ffe9f8ba..13f0f28b2 100644 --- a/ts/editor/TemplateButtons.svelte +++ b/ts/editor/TemplateButtons.svelte @@ -168,7 +168,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html let:shortcutLabel > wrapCurrent("[$$]", "[/$$]", event)} + on:click={() => wrapCurrent("[$$]", "[/$$]")} on:mount={createShortcut} > {tr.editingLatexMathEnv()} diff --git a/ts/editor/editable.ts b/ts/editor/editable.ts index c537cb189..03bad6d82 100644 --- a/ts/editor/editable.ts +++ b/ts/editor/editable.ts @@ -40,12 +40,12 @@ export class Editable extends HTMLElement { this.setAttribute("contenteditable", ""); } - focus() { + focus(): void { super.focus(); setEditableButtons(); } - caretToEnd() { + caretToEnd(): void { caretToEnd(this); } diff --git a/ts/editor/editingArea.ts b/ts/editor/editingArea.ts index a1d9f8f11..35ac59fe7 100644 --- a/ts/editor/editingArea.ts +++ b/ts/editor/editingArea.ts @@ -155,7 +155,6 @@ export class EditingArea extends HTMLDivElement { this.editable.hidden = false; } else { this.editable.hidden = true; - console.log("eyo", this.fieldHTML); this.codable.setup(this.fieldHTML); } diff --git a/ts/editor/helpers.ts b/ts/editor/helpers.ts index 240a12611..afee4a781 100644 --- a/ts/editor/helpers.ts +++ b/ts/editor/helpers.ts @@ -1,7 +1,9 @@ // Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import type { EditingArea } from "./editingArea"; +/* eslint +@typescript-eslint/no-non-null-assertion: "off", + */ export function nodeIsElement(node: Node): node is Element { return node.nodeType === Node.ELEMENT_NODE;