diff --git a/mt-static/plugins/MTBlockEditor/src/loader_entry.ts b/mt-static/plugins/MTBlockEditor/src/loader_entry.ts index 00a226d..4248f9f 100644 --- a/mt-static/plugins/MTBlockEditor/src/loader_entry.ts +++ b/mt-static/plugins/MTBlockEditor/src/loader_entry.ts @@ -60,10 +60,12 @@ async function initSelectElms(selectElms: NodeListOf): Promis inputElm.value = target.value; target.closest(".mt-editor-manager-wrap")?.appendChild(wrap); + const editorId = target.id.replace(/.*-/, ""); const fieldName = ( document.querySelector( - `#editor-header .tab[mt\\:command="set-editor-${target.id.replace(/.*-/, "")}"] a` + `#editor-header .tab[mt\\:command="set-editor-${editorId}"] a` + + `, #editor-header .tab[data-mt-command="set-editor-${editorId}"] a` ) as HTMLElement ).textContent || ""; const opts: ApplyOptions = {