Browse Source

:art: https://github.com/siyuan-note/siyuan/issues/12855

Vanessa 8 months ago
parent
commit
1bacf63b0c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/src/menus/protyle.ts

+ 2 - 2
app/src/menus/protyle.ts

@@ -1038,9 +1038,9 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
                 });
                 textElements[1].value = titleElement.textContent;
                 textElements[1].addEventListener("input", (event) => {
-                    const value = (event.target as HTMLInputElement).value.replace(/\n|\r\n|\r|\u2028|\u2029/g, "");
+                    const value = (event.target as HTMLInputElement).value;
                     imgElement.setAttribute("title", value);
-                    titleElement.textContent = value;
+                    titleElement.innerText = value;
                     mathRender(titleElement);
                 });
                 textElements[2].value = imgElement.getAttribute("alt") || "";