Try the following:
var textarea = $('textarea[name="html"]');
var view=$('#view');
textarea.hide();
var editor = ace.edit("editor");
editor.setTheme("ace/theme/eclipse");
editor.getSession().setMode("ace/mode/html");
editor.getSession().on('change', function () {
view.contents().find('body').html(editor.getSession().getValue());
});
I assumed that view- yours iframe.
I use the contents()jQuery function to get into iframeand replace html with what is in the editor.
source
share