Syntax highlighting and formatting #16706
Replies: 4 comments 1 reply
-
I came across https://shiki.matsu.io/ for syntax highlighting which has integration with Monaco editor allowing to use Shiki's syntax highlighting engine to highlight Monaco: https://shiki.matsu.io/packages/monaco @iOvergaard @nielslyngsoe some thoughts, which may be relevant regarding themes in backoffice. |
Beta Was this translation helpful? Give feedback.
-
I think we can use the There's a demo of it here: |
Beta Was this translation helpful? Give feedback.
-
It can possible be used to highlight the CSS in RTE styles preview as well by combining the selector and the properties and possible lock the CSS selector. |
Beta Was this translation helpful? Give feedback.
-
Another place where it would be useful is in the webhook delivery logs in Umbraco. E.g. some similar to this shown in Adyen webhooks for JSON response: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In the current backoffice we have a
<umb-code-snippet>
component, which doesn't really highlight or format the code snippet.When I added it back in the days I considered Prism or highlightjs, but we didn't want to include another library at that time.
We could probably have had a readonly instance of Ace Editor.
In the new backoffice the code editor is replaced by Monaco editor
I wonder if we can use the as code formatting or any other lightweight library for code formatting and syntax highlighting? I think it could be useful in packages showing a code snippet or maybe some help to more technical content editors.
https://stackoverflow.com/questions/52700307/how-to-use-monaco-editor-for-syntax-highlighting
Beta Was this translation helpful? Give feedback.
All reactions