-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")Related to the overarching Site Editor (formerly "full site editing")
Description
Description
There is a warning in the iframed Full Site Editor when enqueueing a stylesheet that isn't associated with a block.
I build a lot of plugins that use block filters only to enhance core blocks, which don't require creating custom blocks.
For plugins, the warning suggests using the block API's style or editorStyle:
I'm creating this issue b/c I'm concerned that there may not be a way to properly enqueue stylesheets in the iframed editor without being associated with a block.
Step-by-step reproduction instructions
- Enqueue stylesheet for a plugin in the Full Site Editor:
function enqueue_editor_styles() {
// Enqueue editor only styles.
wp_enqueue_style(
'my-plugin-block-editor',
plugin_dir_url( __FILE__ ) . 'build/index.css',
array(),
'1.0.0'
);
}
add_action( 'enqueue_block_editor_assets', 'enqueue_editor_styles' );
- Go to Site Editor
- Open browser console to see warning
WordPress information
- WordPress version: 5.7.2
- Gutenberg version: 10.9.1
- Are all plugins except Gutenberg deactivated? No
- Are you using a default theme (e.g. Twenty Twenty-One)? No
Device information
- Device: Desktop
- Operating system: macOS Catalina
- Browser: Chrome 91.0.4472.114
richtabor, ndiego, skorasaurus, kurudrive and lkraav
Metadata
Metadata
Assignees
Labels
[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")Related to the overarching Site Editor (formerly "full site editing")