I’m using SlateJS with React, and I need to handle lineHeight style property.
<code>const styles = el.style;
if (styles.color) {
nodeAttributes.color = styles.color;
}
if (styles.backgroundColor) {
nodeAttributes.bgColor = styles.backgroundColor;
}
</code>
<code>const styles = el.style;
if (styles.color) {
nodeAttributes.color = styles.color;
}
if (styles.backgroundColor) {
nodeAttributes.bgColor = styles.backgroundColor;
}
</code>
const styles = el.style;
if (styles.color) {
nodeAttributes.color = styles.color;
}
if (styles.backgroundColor) {
nodeAttributes.bgColor = styles.backgroundColor;
}
That’s the way I set the color and bgColor and it works. But if I try to handle lineHeight like that it doesn’t work. How can I handle that property? I could not find anything in the official Slate documentation.