Skip to content

Commit

Permalink
fix: image render error within the control #406
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Jan 13, 2024
1 parent 7e2c44d commit d175f92
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/editor/utils/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,21 +288,22 @@ export function formatElementList(
}
}
}
formatElementList(valueList, {
...options,
isHandleFirstElement: false
})
for (let v = 0; v < valueList.length; v++) {
const element = valueList[v]
const valueStrList = splitText(element.value)
for (let e = 0; e < valueStrList.length; e++) {
const value = valueStrList[e]
elementList.splice(i, 0, {
...element,
controlId,
value: value === '\n' ? ZERO : value,
type: element.type || ElementType.TEXT,
control: el.control,
controlComponent: ControlComponent.VALUE
})
i++
}
const value = element.value
elementList.splice(i, 0, {
...element,
controlId,
value: value === '\n' ? ZERO : value,
type: element.type || ElementType.TEXT,
control: el.control,
controlComponent: ControlComponent.VALUE
})
i++
}
}
} else if (placeholder) {
Expand Down

0 comments on commit d175f92

Please sign in to comment.