Prism HTML highlighter

后端 未结 6 1255
陌清茗
陌清茗 2020-12-16 11:50

I\'m using Prism and its working well for CSS:

p { color: red }

but

6条回答
  •  不知归路
    2020-12-16 12:30

    I actually ran into same issue where i placed prism js and prism css on html page but couldn't get the highlighting. Not sure if it will be the issue with others but for me it was some global css that was set as color black for all "code","pre" tags. After i removed that color from there prism highlighting started showing. If it still doesn't work than you can follow this article Code syntax higlighter using Prism js. I couldn't see much difference but i was having issue when i placed prism js below the code i wanted to highlight. When i moved that to top it started working. If anyone have issue they can try this.

提交回复
热议问题