fix: update snippets after changing template type in template editor

This commit is contained in:
windingwind 2024-09-12 08:17:26 +00:00
parent 5caced3578
commit dcd84e1e53

View File

@ -187,6 +187,11 @@ export async function showTemplateEditor() {
?.addEventListener("click", (ev) => {
restoreTemplates(_window);
});
_window.document
.querySelector("#editor-type")
?.addEventListener("command", (ev) => {
updateSnippets((ev.target as XUL.MenuList)?.value);
});
addon.data.template.editor.window?.focus();
const editorWin = (_window.document.querySelector("#editor") as any)
.contentWindow;