feat:copy and paste highlight element
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user