Problem:
When I get a string of HTML in a text string and to insert/or set ACE.js editor value, and to use beautify to tidy/ indent the code, however it is not working, I was wondering if ext-beautify.js which is provided by ACE.js is supporting html,css,js beautifying? what am I doing wrong here?
var htmlString = "<div class="row"><div class="col-sm-12"><span>chrome</span></div></div>";
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/html");
editor.session.setValue(htmlString);
var beautify = ace.require("ace/ext/beautify");
beautify.beautify(editor.session);
Output on ACE.js editor
<div class="row"><div class="col-sm-12"><span>chrome</span></div></div>
But I need it to be
<div class="row">
<div class="col-sm-12">
<span>chrome</span>
</div>
</div>
Any suggestion or solution?