diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts index 660161f65..4f5b8c492 100644 --- a/app/src/protyle/index.ts +++ b/app/src/protyle/index.ts @@ -30,6 +30,8 @@ import {resize} from "./util/resize"; import {getDocByScroll} from "./scroll/saveScroll"; import {App} from "../index"; import {insertHTML} from "./util/insertHTML"; +import {showColMenu} from "./render/av/col"; +import {avRender} from "./render/av/render"; export class Protyle { @@ -99,6 +101,14 @@ export class Protyle { reloadProtyle(this.protyle, false); } break; + case "refreshAttributeView": + Array.from(this.protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${data.data.id}"]`)).forEach((item: HTMLElement) => { + item.removeAttribute("data-render"); + avRender(item, () => { + showColMenu(this.protyle, item, item.querySelector(".av__row--header").lastElementChild.previousElementSibling as HTMLElement); + }); + }); + break; case "addLoading": if (data.data === this.protyle.block.rootID) { addLoading(this.protyle, data.msg);