diff --git a/src/editor/index.tsx b/src/editor/index.tsx index 8eeb9d9..81f6182 100644 --- a/src/editor/index.tsx +++ b/src/editor/index.tsx @@ -60,6 +60,24 @@ function RemoveBlockTypes() { return null; } +/** + * Initial content loader. Determine if the textarea contains blocks or raw HTML + * + * @param {string} content Text area content + * @param {*} parser Gutenberg `parse` function + * @param {*} rawHandler Gutenberg `rawHandler` function + */ +function onLoad( content, parser, rawHandler ) { + // Does the content contain blocks? + if ( content.indexOf( '