I'm trying to make a plugin that will insert an option into the Customize menu for the theme that will allow you to edit SCSS and LESS. I've gotten as far as creating the fields and having them work, but I cannot get color formatting to work on the editor box.
After looking at the WP source code, I came across this: https://github.com/WordPress/WordPress/blob/master/wp-includes/customize/class-wp-customize-code-editor-control.php
And so, I built up a script to format everything based on what the source code read. This still does not style the box.
Here is my code:
$wp_customize->add_control(
new WP_Customize_Code_Editor_Control(
$wp_customize,
"sassify_scss",
array(
"label" => "Custom SCSS",
"section" => 'sassify-scss',
"settings" => "sassify_scss",
"editor_settings" => array(
'type' => "scss",
'codemirror' => array(
'indentUnit' => 2,
'tabSize' => 2,
)
)
)
)
);