Vanessa 2024-10-27 17:30:01 +08:00
parent 8ab7c5cc73
commit eb849e725a

View file

@ -1021,9 +1021,6 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
element.style.maxWidth = "none";
const textElements = element.querySelectorAll("textarea");
textElements[0].addEventListener("input", (event: InputEvent) => {
if (event.isComposing) {
return;
}
const value = (event.target as HTMLInputElement).value.replace(/\n|\r\n|\r|\u2028|\u2029/g, "");
imgElement.setAttribute("src", value);
imgElement.setAttribute("data-src", value);