conclave-team/conclave

Code highlight

Opened this issue · 3 comments

ad-m commented

I suggest to introduce a syntax coloring mechanism in the editor. Parallel coding is valuable, for example, when collaborating on a group task in college.

Since there is a text field, it seems that it is possible to enter the choice of syntax coloring and to color the text field.

Thanks for the suggestion! I agree that parallel coding is very handy.

For the scope of this project we wanted to focus more on the collaborative aspect than the editor itself. That's why we decided to keep it rather simple and just use markdown.

Currently our Editor logic is dependent on the SimpleMDE library. However, it wouldn't be too difficult to abstract away the basic editor functionality into its own class and make it editor agnostic. That would allow you to swap in a code editor, like Ace, that supports syntax highlighting and only have to change the API endpoints.

What about just integrating HighlightJS to the text? I am going to try it out and try a PR.

I'm not familiar with that library but definitely feel free! I would be interested in any PR that implemented it.