Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
No response
Reproduction Steps
I am trying to implement a Monaco editor within an existing (Knockout based) application. No matter what I do I seem to get this error:
monarchCommon.ts:137 Uncaught (in promise) Error: html: an 'include' attribute must be a string at: tokenizer.root
at Object.createError (monarchCommon.ts:137:9)
at addRules (monarchCompile.ts:443:26)
at compile (monarchCompile.ts:511:4)
at Object.<anonymous> (standaloneLanguages.ts:378:142)
at Generator.next (<anonymous>)
at fulfilled (nls.ts:4:97)
I've tried various things to get this working, but without success:
- Creating a model, rather than passing in the value and language directly
- Setting the language after the editor has loaded
- Rendering styles via a shadow DOM
My code to create the editor currently looks like this:
const model = monaco.editor.createModel(textareaElem.value, 'html');
var editor = monaco.editor.create(editorElem, {
model: model,
});
Actual (Problematic) Behavior
No response
Expected Behavior
No response
Additional Context
No response
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
No response
Reproduction Steps
I am trying to implement a Monaco editor within an existing (Knockout based) application. No matter what I do I seem to get this error:
I've tried various things to get this working, but without success:
My code to create the editor currently looks like this:
Actual (Problematic) Behavior
No response
Expected Behavior
No response
Additional Context
No response