Skip to content

Commit

Permalink
build: v1.2.5 release (^.^)YYa!!
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfuhai committed Oct 31, 2024
1 parent be05a4b commit 13b96b1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion changes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AiEditor ChangeLog


## v1.2.4 20241031:
## v1.2.5 20241031:
- fix: CodeBlock Extensions error sometime
- fix: optimize paste extension and fix paste with data-pm-slice is error
- fix: fix tab key conflict with ordered lists
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "aieditor",
"author": "yangfuhai",
"version": "1.2.4",
"version": "1.2.5",
"type": "module",
"keywords": [
"editor",
Expand Down
7 changes: 4 additions & 3 deletions src/util/htmlUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,14 @@ export const clearDataMpSlice = (html: string) => {
const parser = new DOMParser();
const doc = parser.parseFromString(html, 'text/html');
const fragment = document.createDocumentFragment();
for (let child of doc.body.children) {
const children = doc.body.children;
for (let child of children) {
if (child.hasAttribute("data-pm-slice")) {
child.childNodes.forEach((child) => {
fragment.appendChild(child);
fragment.appendChild(child.cloneNode(true));
})
} else {
fragment.appendChild(child);
fragment.appendChild(child.cloneNode(true));
}
}
const tempDiv = document.createElement('div');
Expand Down

0 comments on commit 13b96b1

Please sign in to comment.