Browse Source

:art: fix https://github.com/Vanessa219/vditor/issues/1004

Vanessa 3 years ago
parent
commit
f3e158a2bf
2 changed files with 3 additions and 2 deletions
  1. 2 0
      CHANGELOG.md
  2. 1 2
      src/ts/wysiwyg/highlightToolbarWYSIWYG.ts

+ 2 - 0
CHANGELOG.md

@@ -97,6 +97,8 @@
 
 ### v3.8.11 / 2022-01-xx
 
+* [1004](https://github.com/Vanessa219/vditor/issues/1004) options.input无法监听点击toolbar link的输入内容 `改进功能`
+
 ### v3.8.10 / 2021-12-21
 
 * [1134](https://github.com/Vanessa219/vditor/issues/1134) 渲染时代码块复制图标报错 `修复缺陷`

+ 1 - 2
src/ts/wysiwyg/highlightToolbarWYSIWYG.ts

@@ -972,8 +972,6 @@ const linkHotkey = (
 };
 
 export const genAPopover = (vditor: IVditor, aElement: HTMLElement) => {
-    const lang: keyof II18n | "" = vditor.options.lang;
-    const options: IOptions = vditor.options;
     vditor.wysiwyg.popover.innerHTML = "";
 
     const updateA = () => {
@@ -982,6 +980,7 @@ export const genAPopover = (vditor: IVditor, aElement: HTMLElement) => {
         }
         aElement.setAttribute("href", input1.value);
         aElement.setAttribute("title", input2.value);
+        afterRenderEvent(vditor);
     };
 
     aElement.querySelectorAll("[data-marker]").forEach((item: HTMLElement) => {