diff --git a/sample-monarch/index.html b/sample-monarch/index.html index e057fc47..d2b811c9 100644 --- a/sample-monarch/index.html +++ b/sample-monarch/index.html @@ -3,23 +3,6 @@ - @@ -46,7 +29,20 @@ } }); + // Define a new theme that constains only rules that match this language + monaco.editor.defineTheme('myCoolTheme', { + base: 'vs', + inherit: false, + rules: [ + { token: 'custom-info', foreground: '808080' }, + { token: 'custom-error', foreground: 'ff0000', fontStyle: 'bold' }, + { token: 'custom-notice', foreground: 'FFA500' }, + { token: 'custom-date', foreground: '008800' }, + ] + }); + var editor = monaco.editor.create(document.getElementById('container'), { + theme: 'myCoolTheme', value: getCode(), language: 'myCustomLanguage' }); @@ -108,4 +104,4 @@ } - \ No newline at end of file +