<script>
window.onerror = function () { return true; };
var editor;
var contentSeted = false;
KindEditor.ready(function (K) {
editor = K.create('#details', {
cssData: 'body {font-family: "微软雅黑"; font-size: 24px}',
allowFileManager: false,
allowImageUpload: false,
resizeType: 0, //不能更改大小
fullscreenMode: true,
items: [
'undo', 'redo', '|', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', '|', 'clearhtml', 'quickformat', 'selectall', 'flash', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'link', 'unlink', '|', 'template', 'code', 'source', 'preview',
],
afterChange: function () {
if (editor && contentSeted)
window.external.RequestContent(editor.html());
}
});
setContent(window.external.GetContent());
});
function setContent(content) {
if (editor) {
contentSeted = false;
editor.html(content);
contentSeted = true;
}
}
</script>
</head>
<body style="padding: 0; margin: 0;">
<textarea id="details" style="display: block; width: 680px; height: 100%; visibility: hidden;"></textarea>
</body>
</html>