Monaco Editor Colorize Issue Or Requirement. #3761
Replies: 2 comments
-
@alexdima - Any solution for this write now. Atleast temporary solution would help us. Because we hardly replaced "highlight js" and use monaco in our product. |
Beta Was this translation helpful? Give feedback.
-
@vinothkumarkp I don't think there is a straight forward way to achieve what you want. Here is an idea, but to be honest, I have doubts that it would work in practice. You can visit each element you want to colorize on your own, and for each element you can build a string with the underlying text and an array of extra HTML elements. The complexity of this datastructure depends on the complexity of the HTML you want to support (i.e. do you want to support elements inside elements or not). For the above snippet the data you would need to maintain would be the following:
If you have already loaded |
Beta Was this translation helpful? Give feedback.
-
This is the code below. I need to highlight element inside "highlightContent" div ID. But I want to highlight without removing
<del>
node. Highlight.js is doing fine. But monaco editor is removing all the node. Please help it.Beta Was this translation helpful? Give feedback.
All reactions