-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-attaching the web component to DOM breaks editor. #5
Comments
Essentially iframes lose all their state when removed from the DOM. With iframes that reference a URL this just means that they reload the URL but in the case of TinyMCE the iframe is used to store the content, separate CSS from the rest of the page and allow for a separate selection model. As TinyMCE does not keep a copy of the HTML being edited outside of the iframe it is unrecoverable if it is removed from the DOM. The traditional workaround is to call In future when we have proper browser support we'd like to implement an inline-like editor in shadow dom which would then be movable however I have heard from the editor team that their experiments have shown that it's currently impossible due to the way browsers implement selection inside a shadow dom. |
Yes, that's a known limitation which affects Safari: |
Steps to reproduce:
Now the editor is back but the content is not editable and old content is lost.
The text was updated successfully, but these errors were encountered: