-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Missing Blocks: Allow extracting contents as blocks
Resolves #13391 Alternate approach to #14443 When the editor encounters a block without a registered block type it transforms that unknown block into a generic "missing block." A post's author is free to convert that unknown block into a kind of static view from the original saved HTML of the block. Unfortunately this model breaks down when the original block includes nested blocks. Up until this point the editor has failed to account for those inner blocks. --- In this patch we're adding a new option to the missing plugin to allow "extracting" the inner contents. That is, instead of simply converting to static HTML the extract option splits the inner contents into a new list of blocks as if simply removing the outer wrapper. This approach doesn't completely solve the editor's problem because parts of the extracted contents may be wrong, but it provides a reasonable fallback behavior to recover what is possible in the situation where the editor can't understand a block. --- - extracts inner blocks and content when a block is unsupported - creates `core/html` blocks out of non-block content inside unsupported blocks - solve the issue of missing inner block HTML when converting to static HTML. this should be resolved in another patch. - improve the messaging for unsupported blocks during an edit session - fully resolve issues surrounding unsupported blocks
- Loading branch information
Showing
3 changed files
with
52 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters