This commit is contained in:
Vanessa 2023-09-11 13:58:13 +08:00
parent 7e8e6167ff
commit 2e0b8945cf
2 changed files with 3 additions and 3 deletions

View file

@ -364,8 +364,8 @@ export class Toolbar {
}
}
contents.childNodes.forEach((item: HTMLElement, index) => {
if (item.nodeType !== 3 && item.tagName !== "BR") {
const types = item.getAttribute("data-type").split(" ");
if (item.nodeType !== 3 && item.tagName !== "BR" && item.tagName !== "IMG") {
const types = (item.getAttribute("data-type") || "").split(" ");
if (type === "clear") {
for (let i = 0; i < types.length; i++) {
if (textObj && textObj.type === "text") {