mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
Move setShrinkImages()
This commit is contained in:
parent
0198a58a1c
commit
4ab3970cd6
3 changed files with 2 additions and 10 deletions
|
|
@ -1260,12 +1260,6 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
|||
def insertMathjaxChemistry(self) -> None:
|
||||
self.web.eval("wrap('\\\\(\\\\ce{', '}\\\\)');")
|
||||
|
||||
def toggleShrinkImages(self) -> None:
|
||||
self.mw.col.set_config(
|
||||
"shrinkEditorImages",
|
||||
not self.mw.col.get_config("shrinkEditorImages", True),
|
||||
)
|
||||
|
||||
def toggleCloseHTMLTags(self) -> None:
|
||||
self.mw.col.set_config(
|
||||
"closeHTMLTags",
|
||||
|
|
@ -1301,7 +1295,6 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
|||
mathjaxInline=Editor.insertMathjaxInline,
|
||||
mathjaxBlock=Editor.insertMathjaxBlock,
|
||||
mathjaxChemistry=Editor.insertMathjaxChemistry,
|
||||
toggleShrinkImages=Editor.toggleShrinkImages,
|
||||
toggleCloseHTMLTags=Editor.toggleCloseHTMLTags,
|
||||
addImageForOcclusion=Editor.select_image_and_occlude,
|
||||
addImageForOcclusionFromClipboard=Editor.select_image_from_clipboard_and_occlude,
|
||||
|
|
|
|||
|
|
@ -644,8 +644,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
setTags(tags);
|
||||
setTagsCollapsed(await getMeta(tagsCollapsedMetaKey));
|
||||
setMathjaxEnabled((await getColConfig("renderMathjax")) ?? true);
|
||||
// TODO: shrinkEditorImages col config
|
||||
setShrinkImages(true);
|
||||
setShrinkImages((await getColConfig("shrinkEditorImages")) ?? true);
|
||||
// TODO: closeHTMLTags col config
|
||||
setCloseHTMLTags(true);
|
||||
if (mode === "add") {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
|
||||
function toggleShrinkImages(_evt: MouseEvent): void {
|
||||
$shrinkImagesByDefault = !$shrinkImagesByDefault;
|
||||
bridgeCommand("toggleShrinkImages");
|
||||
setColConfig("shrinkEditorImages", $shrinkImagesByDefault);
|
||||
showFloating = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue