Automattic / blocks-everywhere

Gutenberg block editor in WordPress comments, admin pages, bbPress, and BuddyPress.
GNU General Public License v3.0
77 stars 16 forks source link

Allow loading of the editor with non-block content #205

Open dd32 opened 6 months ago

dd32 commented 6 months ago

If the source textarea contains non-block HTML/text, currently the editor loads without any content in the editor.

This PR borrows the loader handler from this isolated editor example, but adopt the block check to look for <!-- wp: as a better notion of whether something is a block content or not.

https://github.com/Automattic/isolated-block-editor/blob/trunk/src/browser/index.js

This fixes editing old posts written pre-block-editor on the WordPress support forums.