Skip to content

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

Closed
sarayourfriend wants to merge 2 commits into
WordPress:masterfrom
sarayourfriend:add/lazy-classic-block
Closed

sarayourfriend wants to merge 2 commits into
WordPress:masterfrom
sarayourfriend:add/lazy-classic-block

Conversation

@sarayourfriend

Copy link
Copy Markdown
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
Copy Markdown
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