You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using .toJSON with computedStyle: true computed styles are copied to the [node].style object. However, when using .toDOM only the [node].attributes.styles text is added to the element.
The text was updated successfully, but these errors were encountered:
So I took a (very belated...) look, and this totally makes sense. The computed styles are pulled from two sources: the inline style, and the resolved CSS styles. The resolved styles aren't part of the DOM, so they are not reflected in the output. One solution to this could be to add a applyComputedStyles option to the .toDOM method.
When using
.toJSON
withcomputedStyle: true
computed styles are copied to the[node].style
object. However, when using.toDOM
only the[node].attributes.styles
text is added to the element.The text was updated successfully, but these errors were encountered: