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:
|
def insertMathjaxChemistry(self) -> None:
|
||||||
self.web.eval("wrap('\\\\(\\\\ce{', '}\\\\)');")
|
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:
|
def toggleCloseHTMLTags(self) -> None:
|
||||||
self.mw.col.set_config(
|
self.mw.col.set_config(
|
||||||
"closeHTMLTags",
|
"closeHTMLTags",
|
||||||
|
|
@ -1301,7 +1295,6 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
||||||
mathjaxInline=Editor.insertMathjaxInline,
|
mathjaxInline=Editor.insertMathjaxInline,
|
||||||
mathjaxBlock=Editor.insertMathjaxBlock,
|
mathjaxBlock=Editor.insertMathjaxBlock,
|
||||||
mathjaxChemistry=Editor.insertMathjaxChemistry,
|
mathjaxChemistry=Editor.insertMathjaxChemistry,
|
||||||
toggleShrinkImages=Editor.toggleShrinkImages,
|
|
||||||
toggleCloseHTMLTags=Editor.toggleCloseHTMLTags,
|
toggleCloseHTMLTags=Editor.toggleCloseHTMLTags,
|
||||||
addImageForOcclusion=Editor.select_image_and_occlude,
|
addImageForOcclusion=Editor.select_image_and_occlude,
|
||||||
addImageForOcclusionFromClipboard=Editor.select_image_from_clipboard_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);
|
setTags(tags);
|
||||||
setTagsCollapsed(await getMeta(tagsCollapsedMetaKey));
|
setTagsCollapsed(await getMeta(tagsCollapsedMetaKey));
|
||||||
setMathjaxEnabled((await getColConfig("renderMathjax")) ?? true);
|
setMathjaxEnabled((await getColConfig("renderMathjax")) ?? true);
|
||||||
// TODO: shrinkEditorImages col config
|
setShrinkImages((await getColConfig("shrinkEditorImages")) ?? true);
|
||||||
setShrinkImages(true);
|
|
||||||
// TODO: closeHTMLTags col config
|
// TODO: closeHTMLTags col config
|
||||||
setCloseHTMLTags(true);
|
setCloseHTMLTags(true);
|
||||||
if (mode === "add") {
|
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 {
|
function toggleShrinkImages(_evt: MouseEvent): void {
|
||||||
$shrinkImagesByDefault = !$shrinkImagesByDefault;
|
$shrinkImagesByDefault = !$shrinkImagesByDefault;
|
||||||
bridgeCommand("toggleShrinkImages");
|
setColConfig("shrinkEditorImages", $shrinkImagesByDefault);
|
||||||
showFloating = false;
|
showFloating = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue