quill icon indicating copy to clipboard operation
quill copied to clipboard

Choose language for syntax highlighting

Open veeral-patel opened this issue 6 years ago • 9 comments
trafficstars

Thank you for this great library!

So I know Quill.js supports syntax highlighting, using highlight.js. The way it works is that Quill.js automatically detects the language of your code block and applies the appropriate syntax highlighting.

What I'd like, though, is the ability to choose what language my code block is for highlighting. In other words, to be able to choose the language from a dropdown above the code block. This way, users know for a fact that the language they're writing in is being used for syntax highlighting.

Is there a way to do this out of the box? Or is there an elegant way to add a CodeMirror or Ace editor block inside the Quill editor!

Thank you again for putting this project together! I really appreciate your effort.

veeral-patel avatar Sep 17 '19 04:09 veeral-patel

Did you ever figure anything out for this?

sudofox avatar Jun 01 '21 21:06 sudofox

2022 still nothing, how is this possible .(

Daedra22 avatar Jun 11 '22 09:06 Daedra22

Again it would be really great to get some clarification on this, if anyone can... would be really useful for sure

Investigamer avatar Oct 07 '22 14:10 Investigamer

Please someone, hljs does not detect html code properly, so its super annoying to go back in and change the stuff by hand

hermanboxcar5 avatar Oct 24 '23 17:10 hermanboxcar5

You can use quill-react-commercial.

It can choose language and copy code. Like below gif: quill-code-language-copy

ludejun avatar May 02 '24 09:05 ludejun