Igual me sale si le quito el código del Contenido en el Visor html sale desplegado normal, pero con el código siguiente sale mal, cual será el problema?:
“<!doctype html>
<html>
<head>
<title>Cirrus.js Editor</title>
<meta charset=‘utf-8’/>
<link rel=‘stylesheet’ href=’” + sysCacheClientPath + “codemirror.css’>
<link rel=‘stylesheet’ href=’” + sysCacheClientPath + “monokai.min.css’>
<link rel=‘stylesheet’ href=’” + sysCacheClientPath + “dialog.css’>
<script src=’” + sysCacheClientPath + “codemirror.js’></script>
<script src=’” + sysCacheClientPath + “javascript.js’></script>
<script src=’” + sysCacheClientPath + “xml.js’></script>
<script src=’” + sysCacheClientPath + “active-line.js’></script>
<script src=’” + sysCacheClientPath + “dialog.js’></script>
<script src=’” + sysCacheClientPath + “search.js’></script>
<script src=’” + sysCacheClientPath + “searchcursor.js’></script>
<script src=’” + sysCacheClientPath + “match-highlighter.js’></script>
<script src=’” + sysCacheClientPath + “jquery-1.10.1.min.js’></script>
<style type=‘text/css’>
.CodeMirror {border: 0px solid black; font-size:13px; height: auto;}
body { overflow: hidden; background-color: rgb(39,40,34); }
#editor {
position: absolute;
top: 60px;
right: 0;
bottom: 0;
left: 0;
}
h4 {color: white; background-color: #4b8cf5 ; padding: 5px 10px; font-weight: bold; width: 100px; text-align:center; border-radius: 5px;}
h4:hover {background-color: #3879ac;}
</style>
</head>
<body>
<form>
<h4 id=‘click’>Guardar</h4>
Link
<textarea id=‘editor1’ name=‘code’>” +
#BODY +"</textarea>
</form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById(‘editor1’), {
lineNumbers: true,
styleActiveLine: true,
matchBrackets: true,
theme: ‘monokai’,
mode: ‘" + LENGUAJE + "’,
htmlMode: true,
viewportMargin: Infinity
});
</script>
<script>
function simulateClick(id) {
var evt = document.createEvent(‘MouseEvents’);
evt.initMouseEvent(‘click’, true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
var cb = document.getElementById(id);
cb.dispatchEvent(evt);
}
$(’
#click’).click(function(){
var html = editor.getValue();
document.getElementById(‘html’).innerHTML = ‘’
var headertext=document.createTextNode(html)
document.getElementById(‘html’).appendChild(headertext)
simulateClick(‘external’)
})
</script>
</body>
</html>"