monaco-editor/website/playground/new-samples/creating-the-editor/syntax-highlighting-for-html-elements/sample.js
2021-11-16 22:32:27 +01:00

4 lines
221 B
JavaScript

// The colorizeElement-function will read the data-lang-attribute
// from the element to select the correct language mode. In this
// sample it is text/css.
monaco.editor.colorizeElement(document.getElementById('code'));