Enable code highlighting in Task Description #1758

Closed
opened 2020-12-18 15:30:16 +00:00 by nullptr · 6 comments

It appears that the MDE text editor doesn't have code highlighting enabled when using code blocks, would this be a useful feature to implement?

It appears that the MDE text editor doesn't have code highlighting enabled when using code blocks, would this be a useful feature to implement?
nullptr changed title from Enable code highlighting in to Enable code highlighting in Task Description 2020-12-18 15:30:54 +00:00
Owner

Hey, thanks for the suggestion!

I'm not quite sure if that's something easyMDE would need to implement or we when rendering the description. Do you mean highlighting while typing or when it is rendered?

Hey, thanks for the suggestion! I'm not quite sure if that's something easyMDE would need to implement or we when rendering the description. Do you mean highlighting while typing or when it is rendered?
konrad added the
kind/feature
label 2020-12-18 16:01:10 +00:00
Author

Sorry for the hastily typed issue, I fat fingered the submit button too early!

I mean just on render, I don't think easyMDE allows for syntax highlighting on edit.

More info on this can be found at https://github.com/NikulinIlya/vue-easymde/blob/master/doc/configuration_en.md under "codeSyntaxHighlighting", I believe.

Just a nice QoL change for people like me who use Vikunja for issue tracking.

Thank you for the prompt response! Keep up the amazing work.

Sorry for the hastily typed issue, I fat fingered the submit button too early! I mean just on render, I don't think easyMDE allows for syntax highlighting on edit. More info on this can be found at https://github.com/NikulinIlya/vue-easymde/blob/master/doc/configuration_en.md under "codeSyntaxHighlighting", I believe. Just a nice QoL change for people like me who use Vikunja for issue tracking. Thank you for the prompt response! Keep up the amazing work.
Owner

Thanks for the hint. I still think (since that's an easyMDE option) that's for syntax highlighting while typing. We're rendering the content ourselves in Vikunja with markedjs which I think would need to enable that separately. But that's something we'd need to test I guess.

Do you want to send a PR?

Thanks for the hint. I still think (since that's an easyMDE option) that's for syntax highlighting while typing. We're rendering the content ourselves in Vikunja with `markedjs` which I think would need to enable that separately. But that's something we'd need to test I guess. Do you want to send a PR?
Owner

Yup, looks like marked js has another option for syntaxhighlighting: https://github.com/markedjs/marked/blob/master/docs/USING_ADVANCED.md#alternative-using-reference

Yup, looks like marked js has another option for syntaxhighlighting: https://github.com/markedjs/marked/blob/master/docs/USING_ADVANCED.md#alternative-using-reference
Author

Nice searching. Unfortunately I am not in a position right now for me to clone/debug, but thank you for pointing me in the right direction and giving a few pointers.

Nice searching. Unfortunately I am not in a position right now for me to clone/debug, but thank you for pointing me in the right direction and giving a few pointers.
Owner

Implemented in f1206e8274, feel free to reopen if you have any problems.

Implemented in https://kolaente.dev/vikunja/frontend/commit/f1206e827475e4f552ded87925c648ec4c700650, feel free to reopen if you have any problems.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1758
No description provided.