feat: recursion format element context

This commit is contained in:
Hufe921
2023-04-21 13:41:57 +08:00
parent 3b66b26c85
commit 9f84285763
2 changed files with 8 additions and 2 deletions
+3
View File
@@ -551,6 +551,9 @@ export function formatElementContext(sourceElementList: IElement[], formatElemen
if (!copyElement) return
for (let e = 0; e < formatElementList.length; e++) {
const targetElement = formatElementList[e]
if (targetElement.valueList && targetElement.valueList.length) {
formatElementContext(sourceElementList, targetElement.valueList, anchorIndex)
}
for (let i = 0; i < EDITOR_ELEMENT_CONTEXT_ATTR.length; i++) {
const attr = EDITOR_ELEMENT_CONTEXT_ATTR[i]
const value = copyElement[attr] as never