Skip to content
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

Reusing TinyMCE instances #341

Closed
ellatrix opened this issue Mar 28, 2017 · 9 comments
Closed

Reusing TinyMCE instances #341

ellatrix opened this issue Mar 28, 2017 · 9 comments
Assignees
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Performance Related to performance efforts

Comments

@ellatrix
Copy link
Member

If we're going to have multiple TinyMCE instances (one or more for each block), it might be good to try to reuse one for all of the fields. The instance could be attached to the field that is currently focussed, undo levels could be disabled etc. Creating new blocks would also be a bit faster.

@androb
Copy link
Contributor

androb commented Mar 28, 2017

@spocke @Afraithe maybe they should be using our inline mode?

@ellatrix
Copy link
Member Author

We are using the inline mode :)

@androb
Copy link
Contributor

androb commented Mar 28, 2017

Ha :) sorry. I thought we handled this sort of reuse of editors automagically. It is possible that it is something we did in Textbox.io and haven't yet got into TinyMCE.
#abovemypaygrade

@mtias mtias added Framework Issues related to broader framework topics, especially as it relates to javascript TinyMCE labels Mar 29, 2017
@jasmussen
Copy link
Contributor

Is this more or less addressed with the Editable component?

@ellatrix
Copy link
Member Author

@jasmussen No, they're all separate instances. See also #919 (comment).

@androb
Copy link
Contributor

androb commented Oct 4, 2017

@iseulde - is this still an issue? It would be good to understand a bit more about what you are looking for here. Feel free to ping me on Slack.

@ellatrix
Copy link
Member Author

The idea was to only have one instance of TinyMCE and when the selected Editable changes, move the instance to the new Editable, discard undo levels etc. to avoid having tons of instances around. This may be something we can explore at a later stage to improve performance. Not sure how much it would improve that though.

@ellatrix ellatrix added the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Oct 11, 2017
@ellatrix
Copy link
Member Author

This may still be an interesting experiment to try to speed things up. I'm noticing some really big delays when enter is pressed on iOS and a new instance needs to be created. Theoretically this will create one instance per setting variant (most blocks will have the same setting, variants include list and table), and when a new field is focussed it will attach to that field (reset target node, purge undo levels, trigger nodeChange etc.). When enter is pressed, the field and editor will be available immediately. This may also be beneficial for big posts where now an instance needs to be created for each editable field. When we reuse instance, we can just load the content with contentEditable and that's it.

@ellatrix ellatrix self-assigned this Jan 31, 2018
@ellatrix ellatrix added the [Type] Performance Related to performance efforts label Jan 31, 2018
@jasmussen jasmussen removed the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Feb 1, 2018
@jeffpaul jeffpaul modified the milestones: Merge Proposal, Bonus Features Feb 8, 2018
@karmatosed
Copy link
Member

As we approach the close of phase one, lets close this for now. We can always look at this in a later stage if we do want and reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Performance Related to performance efforts
Projects
None yet
Development

No branches or pull requests

6 participants