Use CodeMirror editor for both CSS and HTML on the same page
I just ran into this exact issue and with a tiny bit of tweaking it should work, what you have is 90% of the way there. I’ve tweaked your code slightly so it should now work. The PHP: add_action(‘admin_enqueue_scripts’, ‘joermo_enqueue_scripts’); function joermo_enqueue_scripts($hook) { $joermo_code[‘ce_html’] = wp_enqueue_code_editor(array(‘type’ => ‘text/html’)); $joermo_code[‘ce_css’] = wp_enqueue_code_editor(array(‘type’ => ‘text/css’)); wp_localize_script(‘jquery’, ‘joermo_code’, … Read more