This commit is contained in:
Vanessa 2026-01-26 16:13:20 +08:00
parent 274d5c7562
commit 6b918c82a9
3 changed files with 3 additions and 3 deletions

View file

@ -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();
}

View file

@ -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";
}

View file

@ -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",
};