I normally use LESS files in Drupal instead of CSS for easier stylesheet maintenance. However, it looks like specifying a LESS file as CKEditor custom css file does not work. The custom "Editor CSS" file which is specified in CKEditor profile->CSS tab, must have ".css" extension to work (otherwise it is loaded literally as a .less file which the browser does not understand). It would be good if the stylesheet were loaded in such a way that it would be preprocessed by the LESS CSS Preprocessor, the same as other stylesheets are preprocessed. Otherwise, to have the WYSIWYG effect, the stylesheet for nodes elements must be redefined using normal CSS coding.
Comment | File | Size | Author |
---|---|---|---|
#2 | ckeditor_less_fix.patch | 1.01 KB | ptoly |
Comments
Comment #1
dczepierga CreditAttribution: dczepierga commentedI will check this asap, and maybe we add support for it in the near future - but first i must check how much work is needed to add support for it.
Greetings
Comment #2
ptoly CreditAttribution: ptoly commentedHere's a quick shot at a fix. Just rewrites the file path for .less files in the theme.
Patch is for 6-1.5 version.
Comment #3
dczepierga CreditAttribution: dczepierga commented@ptoly, really thx for patch and good work... I commit your patch to GIT, so pls check last DEV version.
Greetings
Comment #5
kytom CreditAttribution: kytom commentedI would love to see this feature in 7.x. Is it at all possible?
Comment #6
dczepierga CreditAttribution: dczepierga commented@kytom, i move this to new issue: #1588022: [D7] Using LESS file instead of CSS for custom editor stylesheet
Next time pls not reopen old issue, but create new one and add link to it.
I've add there patch to add support to LESS files, but u must check it.
Greetings
Comment #7
kytom CreditAttribution: kytom commented@dczepierga, thank you so much for a quick response!
Also, please excuse my misbehaviour, I will do as you wrote next time. I'm still new and learning the rules of the community.
Thanks again!