Hi people,
I have been using the LESS CSS Preprocessor module (http://drupal.org/project/less) for my projects.
I currently use TinyMCE as the WYSIWYG library. I noticed that when the theme CSS option is used for the editor CSS, my theme stylesheet files, that are in less, don't load properly. They appear in the list of css files, but with the less extension, so the features that the less preprocessor provides are ignored.
I noticed that function wysiwyg_get_css is the place where the CSS files are later provided to the editor implementation. Specifically this section.
$files = array();
foreach (drupal_add_css() as $media => $css) {
...Changing this to
$files = array();
// Gets all CSS.
$css = drupal_add_css( );
// Checks if less module exists...
if( module_exists( 'less' ) ){
// Prepares, preprocess and replaces in order to use stylesheets that need to be preprocessed.
$vars = array( 'css' => $css );
less_preprocess_page( $vars, null );
$css = $vars[ 'css' ];
}
foreach ( $css as $media => $css) {
...Makes the editor use the processed less stylesheet (usually located on the files folder inside a less folder where the processed css is located ).
Would this be the right place to use this code? Or is there other place I should look into where something similar could be performed?
I'll appreciate any input.
Thanks

Comments
Please review this patch:
Please review this patch: http://drupal.org/node/1080066#comment-4164166
This is not the same as you, but i made it because of less module.