colorizeModelLine does not work if you try to use immediately after creating the model #3649
Unanswered
davicatunda
asked this question in
Q&A
Replies: 1 comment
-
Yes, the only ones that work really well are |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The code bellow using
monaco.editor.createModel
andmonaco.editor.colorizeModelLine
results into a non-colorized line, but the second time we run (on this case with a setTimeout) it works correctly.monaco-editor version: 0.28
Browser: Chrome
OS: Windows
Playground code that reproduces the issue:
On https://microsoft.github.io/monaco-editor/playground.html try
monaco.editor.tokenize(code, 'css')[0][0]);
.monaco.editor.create
it appears that we need to listen to some event to guarantee that the editor/model is ready, is that the case?
Beta Was this translation helpful? Give feedback.
All reactions