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

Asynchronously load tinyMCE the first time a classic block is edited #21683

Closed
wants to merge 2 commits into from
Closed

Asynchronously load tinyMCE the first time a classic block is edited #21683

wants to merge 2 commits into from

Conversation

sarayourfriend
Copy link
Contributor

Description

Added LazyLoad component. This component allows us to wrap existing components and delay them until required 3rd party scripts and styles are asynchronously loaded. It also provides a hook for post-load setup that resolves before the children are rendered, guaranteeing that the children aren't active until the world around them is set up correctly.

I've then wrapped ClassicEdit in LazyLoad. This 100% does not work and is just a proof of concept.

A related PR: #21244

We'd replace load-scripts/styles in the current code here with requests to those endpoints.

Types of changes

New feature

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

This component allows us to wrap existing components
and delay them until required 3rd party scripts and
styles are asynchronously loaded. It also provides a
hook for post-load setup that resolves before the
children are rendered, guaranteeing that the children
aren't active until the world around them is set up
correctly.
@sarayourfriend
Copy link
Contributor Author

Closing to reopen as a draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant