#5237 Allow more text styles for labelStyles

This commit is contained in:
Ashish Jain 2024-06-20 14:11:12 +02:00
parent f791ea00ef
commit 6d91ae4a09

View File

@ -41,7 +41,26 @@ export const styles2String = (node: Node) => {
stylesArray.forEach((style) => {
const key = style[0];
if (key === 'color') {
if (
key === 'color' ||
key === 'font-size' ||
key === 'font-family' ||
key === 'font-weight' ||
key === 'font-style' ||
key === 'text-decoration' ||
key === 'text-align' ||
key === 'text-transform' ||
key === 'line-height' ||
key === 'letter-spacing' ||
key === 'word-spacing' ||
key === 'text-shadow' ||
key === 'text-overflow' ||
key === 'white-space' ||
key === 'word-wrap' ||
key === 'word-break' ||
key === 'overflow-wrap' ||
key === 'hyphens'
) {
labelStyles.push(style.join(':') + ' !important');
} else {
nodeStyles.push(style.join(':') + ' !important');