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) {
|
if (element.size) {
|
||||||
dom.style.fontSize = `${element.size}px`
|
dom.style.fontSize = `${element.size}px`
|
||||||
}
|
}
|
||||||
|
if (element.highlight) {
|
||||||
|
dom.style.backgroundColor = element.highlight
|
||||||
|
}
|
||||||
clipboardDom.append(dom)
|
clipboardDom.append(dom)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,6 +159,9 @@ export function getElementListByHTML(htmlText: string, options: IGetElementListB
|
|||||||
if (rowFlex !== RowFlex.LEFT) {
|
if (rowFlex !== RowFlex.LEFT) {
|
||||||
element.rowFlex = rowFlex
|
element.rowFlex = rowFlex
|
||||||
}
|
}
|
||||||
|
if (style.backgroundColor !== 'rgba(0, 0, 0, 0)') {
|
||||||
|
element.highlight = style.backgroundColor
|
||||||
|
}
|
||||||
elementList.push(element)
|
elementList.push(element)
|
||||||
}
|
}
|
||||||
} else if (dom.nodeType === 1) {
|
} else if (dom.nodeType === 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user