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

Only initialise TinyMCE once per instance #12386

Merged
merged 1 commit into from
Nov 30, 2018
Merged

Only initialise TinyMCE once per instance #12386

merged 1 commit into from
Nov 30, 2018

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Nov 28, 2018

Description

Currently we're trying to initialise TinyMCE every time the content editable element receives focus.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@ellatrix ellatrix added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Nov 28, 2018
@ellatrix ellatrix requested review from youknowriad and a team November 28, 2018 15:59
initialize() {
if ( this.initialize.called ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just this.initialized 🤷‍♂️

I find it a bit weird to attach a property to the method while we have access to the object but it's minor.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's local state. But I don't mind either way.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@mtias mtias added this to the 4.7 milestone Nov 28, 2018
@ellatrix
Copy link
Member Author

@mtias Removing the "[External Package] TinyMCE" as that's only for issue in TinyMCE.

@youknowriad youknowriad merged commit d30e5eb into master Nov 30, 2018
@youknowriad youknowriad deleted the fix/mce-init branch November 30, 2018 08:13
daniloercoli added a commit that referenced this pull request Nov 30, 2018
…rnmobile/danilo-try-to-fix-undo-redo

* 'master' of https://github.com/WordPress/gutenberg:
  Autocompleters: Consider block category (#12287)
  Only init TinyMCE once per instance (#12386)
  RichText: convert HTML formatting whitespace to spaces (#12166)
  Notices: Remove "files" block in package.json (#12438)
  Edit Post: Avoid rendering AdminNotices compatibility component (#12444)
  Correct the docs manifest (#12411)
daniloercoli added a commit that referenced this pull request Nov 30, 2018
…HEAD

* 'master' of https://github.com/WordPress/gutenberg:
  [RNmobile] Fix problems with undo/redo on Android (#12417)
  Add registry param to withDispatch component (#11851)
  Autocompleters: Consider block category (#12287)
  Only init TinyMCE once per instance (#12386)
  RichText: convert HTML formatting whitespace to spaces (#12166)
  Notices: Remove "files" block in package.json (#12438)
  Edit Post: Avoid rendering AdminNotices compatibility component (#12444)
  Correct the docs manifest (#12411)
@mtias mtias added the [Type] Performance Related to performance efforts label Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants