-
Hi everyone! I'm trying to figure out how to add syntax highlighting to the Paragraph component, preferably a custom syntax highlighter, like in a code editor. I can't find any examples of what values to pass to "highlights" in the Paragraph component, and I'm currently stuck. Any help would be appreciated :) |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Hey!, Its actually quite simple, I'll make an example asap. |
Beta Was this translation helpful? Give feedback.
-
Ahh, I missunderstood the issue. |
Beta Was this translation helpful? Give feedback.
-
There is no easy way to do syntax highlighting, but you can roll out your own version. The |
Beta Was this translation helpful? Give feedback.
-
it is how I do it in valin, my code editor made with freya: https://github.com/marc2332/valin/blob/496d5e545f6576428e14e977abe95951c8d88cf0/src/views/panels/tabs/editor/editor_line.rs#L226 |
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for the help! So what does the |
Beta Was this translation helpful? Give feedback.
it is how I do it in valin, my code editor made with freya: https://github.com/marc2332/valin/blob/496d5e545f6576428e14e977abe95951c8d88cf0/src/views/panels/tabs/editor/editor_line.rs#L226