diff --git a/package.json b/package.json index c28b5efaf..d453004f2 100644 --- a/package.json +++ b/package.json @@ -64,12 +64,14 @@ "@types/marked": "^4.0.1", "bootstrap": "=5.0.2", "bootstrap-icons": "^1.4.0", + "character-entities": "^2.0.2", "codemirror": "^5.63.1", "css-browser-selector": "^0.6.5", "d3": "^7.0.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-svelte3": "^3.4.0", + "gemoji": "^7.1.0", "intl-pluralrules": "^1.2.2", "jquery": "^3.5.1", "jquery-ui-dist": "^1.12.1", diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index f55eef4e3..89262ae21 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -533,7 +533,7 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too setNoteId({}); setColorButtons({}); setTags({}); - setMathjaxEnabled({}); + setMathjaxEnabled({}); """.format( json.dumps(data), json.dumps(collapsed), @@ -551,6 +551,9 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too sticky = [field["sticky"] for field in self.note.note_type()["flds"]] js += " setSticky(%s);" % json.dumps(sticky) + if os.getenv("ANKI_EDITOR_INSERT_SYMBOLS"): + js += " setInsertSymbolsEnabled();" + js = gui_hooks.editor_will_load_note(js, self.note, self) self.web.evalWithCallback( f'require("anki/ui").loaded.then(() => {{ {js} }})', oncallback diff --git a/ts/components/Badge.svelte b/ts/components/Badge.svelte index f68a665ba..d395bdbb7 100644 --- a/ts/components/Badge.svelte +++ b/ts/components/Badge.svelte @@ -3,10 +3,8 @@ Copyright: Ankitects Pty Ltd and contributors License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -->