diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index f37ba244f..fcaa31dca 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -1126,7 +1126,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme imgElement.setAttribute("src", value); imgElement.setAttribute("data-src", value); const imgNetElement = assetElement.querySelector(".img__net"); - if (value.startsWith("assets/")) { + if (value.startsWith("assets/") || value.startsWith("data:image/")) { if (imgNetElement) { imgNetElement.remove(); } diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 26d963eff..87a6d16bb 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -628,7 +628,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { const tdElement = hasClosestByTag(range.startContainer, "TD") || hasClosestByTag(range.startContainer, "TH"); let tdStatus; if (tdElement) { - const cells = nodeElement.querySelectorAll('td, th'); + const cells = nodeElement.querySelectorAll("td, th"); if (cells[cells.length - 1] === tdElement) { tdStatus = "last"; } diff --git a/app/src/util/fetch.ts b/app/src/util/fetch.ts index caf6f1a21..5efb55539 100644 --- a/app/src/util/fetch.ts +++ b/app/src/util/fetch.ts @@ -10,7 +10,7 @@ export const fetchPost = ( data?: any, cb?: (response: IWebSocketData) => void, headers?: IObject, - failCallback?: (response: IWebSocketData) => void,) => { + failCallback?: (response: IWebSocketData) => void) => { const init: RequestInit = { method: "POST", };