Replies: 4 comments
-
I've been trying to work on iframe support on my own, as I need the styles in the editor to match a different site's styles. It starts to work by contentWindow:
And then:
You'll have to paste all the embedded <style> tags -- a couple of main ones and one for each plugin that supports it. Then it lays out better. But then... some functions don't work, like adding a new block by pressing enter: I'd love to see more support for iframe or some way to inject CSS just into the editor's contents. |
Beta Was this translation helpful? Give feedback.
-
I've got another solution for making this work in an iframe -- the iframe independently has all the editor js code, and I inject the content to edit into a hidden textarea, and then invoke the editor js code on the iframe with the contents of the hidden textarea. The editor has a bit of styles with it in <style> tags that override my page's styles, but I'm removing styles from the elements themselves:
And it's still saving the changes properly. Some classes do seem to be needed by the logic, so if you remove them items don't show up. When you create new items, you'll need to check for them:
Still discovering what else needs to happen, like clearing specifically added styles that affect functionality. |
Beta Was this translation helpful? Give feedback.
-
@diedrick Any updates on adding styles that affect functionality? |
Beta Was this translation helpful? Give feedback.
-
The following library uses iframe. |
Beta Was this translation helpful? Give feedback.
-
Hey guys!
Awesome library.
I was wondering if there were any plans for iframe support? How would I go about inserting this to an iframe?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions