Adding style to the elementor editor
-
Hi,
I am trying to enqeue a stylesheet to the elementor editor. According to your example, it should be done like this: https://developers.elementor.com/docs/scripts-styles/editor-styles/
So i wrote a very simple plugin with this code:
function my_plugin_register_editor_styles() {
wp_register_style( ‘editor-style-1’, plugins_url( ‘assets/css/editor-style-1.css’, FILE ) );
}
add_action( ‘elementor/editor/before_register_styles’, ‘my_plugin_register_editor_styles’ );function my_plugin_enqueue_editor_styles() {
wp_enqueue_style( ‘editor-style-1’ );
}
add_action( ‘elementor/editor/before_enqueue_styles’, ‘my_plugin_enqueue_editor_styles’ );In the plugins folder is a folder assets/css with the file editor-style-1.css
However, the style is not enqueued. What am i missing?
The topic ‘Adding style to the elementor editor’ is closed to new replies.