serdarciplak / BlazorMonaco

Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
https://serdarciplak.github.io/BlazorMonaco/
MIT License
432 stars 98 forks source link

How can I decorate a line? #94

Closed elgransan closed 11 months ago

elgransan commented 1 year ago

I found on javascript version to decorate a line I must write the following code:

image

But I couldn't find the way to do this with your wrapper. It is possible?

Thanks!

Ghevi commented 1 year ago

Try this, not sure if it's the best way, the _codeEditor is a reference to the Blazor component you are using. Screenshot 2023-07-24 130510 I'm keeping track of the old decorations because in my case i need to update them when the model changes but for some reason they don't get updated.

Well it seems this method is deprecated, not sure if this is the issue https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md#breaking-changes-1

elgransan commented 1 year ago

Ahhh nice workaround, thanks!