feat: copy and paste table cell background color

pr675
Hufe921 3 years ago
parent 9225bef991
commit c97c6eff40

@ -89,6 +89,9 @@ export function writeElementList(elementList: IElement[], options: DeepRequired<
tdDom.rowSpan = td.rowspan
const childDom = buildDomFromElementList(zipElementList(td.value!))
tdDom.innerHTML = childDom.innerHTML
if (td.backgroundColor) {
tdDom.style.backgroundColor = td.backgroundColor
}
trDom.append(tdDom)
}
tableDom.append(trDom)
@ -341,6 +344,9 @@ export function getElementListByHTML(htmlText: string, options: IGetElementListB
rowspan: tableCell.rowSpan,
value: valueList
}
if (tableCell.style.backgroundColor) {
td.backgroundColor = tableCell.style.backgroundColor
}
tr.tdList.push(td)
})
if (tr.tdList.length) {

Loading…
Cancel
Save