-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support syntax for languages while entering paste #1
Comments
Do you mean updating Highlight.js? Or are you proposing something else? |
@anshuman73 Ping, can you update please? |
Hi, sorry for the delayed response. currently, the viewer chooses the language to highlight the syntax for, wouldn't it be better if the paster can set the syntax too and the viewer gets that syntax highlighting automatically ? |
A potential way could be to store the language in the crypt, but (with my limited cryptographic knowledge), I believe it would make the crypt insecure. |
I had thought about some method of storing a language pre-set (e.g. injecting a language marker into the paste before being encrypted), but I decided not to namely since I wasn't sure how to do the whole thing well. I don't know of a good way to take Highlight.js and apply it to a rich text editor. If you have some idea, I'd be delighted to review a pull request. |
After looking around, it appears CodeMirror would be the best option here. It would need to make sure to invoke the |
@adrivanrex You're more than welcome to submit a pull request with that or any suitable syntax highlighting library added. |
Supporting syntax colouring could be a potential feature to build in the future
The text was updated successfully, but these errors were encountered: