klipse icon indicating copy to clipboard operation
klipse copied to clipboard

CodeMirror Highlighting of CSS inside HTML with htmlmixed

Open btholt opened this issue 6 years ago • 3 comments

Hi friends!

Love the library. Thank you so much. Such an effective teaching tool.

I'm using Klipse in a way similar to how is outlined in this blog post, specifically using <style></style tags for CSS. If you scroll down to the example with <style> tag with Ms Verou in it, you'll note that the CSS has no highlighting in it.

screen shot 2018-05-09 at 1 26 16 pm

This is something that CodeMirror is capable of doing, via its htmlmixed mode. I browsed about the code but I have little familiarity with Clojure so I'm sorry I can't help you much with it.

Is there anything else I can provide you with?

btholt avatar May 09 '18 11:05 btholt

Your help would be much appreciated @btholt. The code for handling html snippets is here: https://github.com/viebel/klipse/blob/master/src/klipse/lang/html.cljs

It seems that we currently use htmlmixed so I don't know why css code is not beautified.

Here are the instructions for setting up a dev env and testing your code.

Let me know if you need further help.

By the way, where is your Klipse-powered webpage?

viebel avatar May 09 '18 18:05 viebel

I'll investigate!

Here is where the website: https://btholt.github.io/intro-to-web-dev-v2/dom

btholt avatar May 19 '18 17:05 btholt

@btholt did you ever figure this out? I am having a similar issue with my lecture notes, which are much less functional without the CSS highlighted :frowning_face: I took a veyr quick look at hte codebase but couldn't figure it out ...

titaniumbones avatar Jan 24 '19 14:01 titaniumbones