Replies: 2 comments 8 replies
-
In the meantime you can recreate your own StyledLeaf / StyledElement, but this is indeed problematic if someone is using more Plate components, as they all use twin.macro Looking forward twin.macro issue feedback |
Beta Was this translation helpful? Give feedback.
1 reply
-
I found a solution when it comes to But the same does not work for me when it comes to plate. Either plate does something different, uses I do not know yet, but it's end of the day for me, so do not eagerly wait for a solution from me today. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I just ran into this, after a bit of debugging I finally found the source of this issue, let me describe it.
As far as I can tell plate under the hood uses
twin.macro
to put styles onStyledLeaf
s andStyledElement
s.It is really nice, since it will create a style tag at the top of the document (head) and that will hold the style rather than putting a style attribute on the tag.
The issue with this is, when you put the editor in an iframe as the iframe example shows, the created style and the tag that would use it will be in "different" documents.
I managed to put together an example that show the issue with
twin.macro
. If you inspect the document you will see it.And also created a discussion on their github, but if this is not something that they plan to support, maybe plate has to fall back and find a different solution to handle styles on StyledLeaf and StyledElement if it still plans to support iframes.
Beta Was this translation helpful? Give feedback.
All reactions