feat:copy and paste highlight element

pr675
Hufe921 3 years ago
parent 17b469be6b
commit 0493ae2d5e

@ -118,6 +118,9 @@ export function writeElementList(elementList: IElement[], options: DeepRequired<
if (element.size) {
dom.style.fontSize = `${element.size}px`
}
if (element.highlight) {
dom.style.backgroundColor = element.highlight
}
clipboardDom.append(dom)
}
}
@ -156,6 +159,9 @@ export function getElementListByHTML(htmlText: string, options: IGetElementListB
if (rowFlex !== RowFlex.LEFT) {
element.rowFlex = rowFlex
}
if (style.backgroundColor !== 'rgba(0, 0, 0, 0)') {
element.highlight = style.backgroundColor
}
elementList.push(element)
}
} else if (dom.nodeType === 1) {

Loading…
Cancel
Save