## Parser You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object][1] ```js const editor = grapesjs.init({ parser: { // options } }) ``` Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance ```js const { Parser } = editor; ``` ## Available Events * `parse:html` - On HTML parse, an object containing the input and the output of the parser is passed as an argument * `parse:css` - On CSS parse, an object containing the input and the output of the parser is passed as an argument ## Methods * [getConfig][2] * [parseHtml][3] * [parseCss][4] ## getConfig Get configuration object Returns **[Object][5]** ## parseHtml Parse HTML string and return the object containing the Component Definition ### Parameters * `input` **[String][6]** HTML string to parse * `options` **[Object][5]?** Options (optional, default `{}`) * `options.htmlType` **[String][6]?** [HTML mime type][7] to parse * `options.allowScripts` **[Boolean][8]** Allow `