-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Try: TinyMCE: On-demand initialization #9040
Conversation
Superseded by #10723? |
Mostly, yes. #10723 doesn't include anything for destroying the initialized fields on blur. |
Needs a rebase after #10723. |
So we are using a lot of RichText blocks in our HowTo structured data block and we are having massive performance issues when people start adding more than say... 10 steps. I have tested our plugin with this PR and it solves our performance issues. We would really like to see this picked up in the near future. |
Hi @aduth - sorry I missed this. If it is still an issue and your suggestions for TinyMCE can help, do you mind opening a ticket at https://github.com/tinymce/tinymce/issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment. I'm also marking as Stale
to make triaging easier.
We'll soon no longer need it, so in my opinion it's good to close. But if there are substantial memory benefits that are needed in the meantime, it's worth to still look into of course. |
Superseded by #13697. |
Related: #8822
Related: #8879
In-Progress: This is a proof-of-concept and as such, is neither complete as presented nor expected to work for all usage.
This pull request seeks to explore a refactor of the TinyMCE component to initialize itself only when it receives focus, and to destroy itself when focus leaves the field.
This serves a dual purpose:
Implementation notes:
Existing selection is reset when initializing TinyMCE, which broke writing flow behaviors. This is a result of TinyMCE resetting the HTML of the element on initialization. A workaround has been implemented to neutralize
editor.dom.setHTML
during initialization.Future considerations may include:
if ( html === node.innerHTML ) return;
ineditor.dom.setHTML
cc @androb
Known issues:
startContainer
property access)isCollapsed
)Observations:
A more thorough performance evaluation should be performed.
Anecdotally, I observed that while there was still significant interaction lag, I was able to convert a post containing 2377 paragraphs to blocks. Previously this conversion would completely stall the tab. See demo content at #8720 (this is certainly an extreme case).