Search code examples
reactjsparsinghtml-parsingmonaco-editor

Is it possible to to get parsed node through monaco editor


The monaco editor I use for web seems to understand where an HTML begins and ends. So it feels like it parses it. So can I use the parsing of monaco to create a nodes tree. Is it possible to do?

Ex: If I load an HTML file content in monaco editor can I use it to create a HTML node tree.


Solution

  • No, Monaco has no parser, just tokenizers for certain languages, which means it cannot give you a parse tree.