解决方案 »

  1.   

    编辑器生成后已经把textarea隐藏了,你看到的不是textarea
      

  2.   

    那请问我应该怎么设置KindEditor为readonly
      

  3.   

    你用火狐的插件firebug看看它生成的html结构,根据你的需求你在写个js单独赋个属性也行啊!
      

  4.   

    editor.readonly();
    http://www.kindsoft.net/ke4/examples/readonly.html
      

  5.   

    我是在一段逻辑下让它readonly,在另外一段逻辑下不让它readonly, readonly()只是让它变成只读,怎么恢复过来呢?
      

  6.   


    我看到了 readonly(false)就是恢复成可编辑的。但是我加了readonly()后怎么不起作用的KindEditor.ready(function (K) {
            var editor1 = K.create('#JE00Warning_ProcessResult', {
                cssPath: '@Url.Content("~/Scripts/kindeditor-4.1/plugins/code/prettify.css")',
                uploadJson: '@Url.Content("~/Scripts/kindeditor-4.1/asp.net/upload_json.ashx")',
                fileManagerJson: '@Url.Content("~/Scripts/kindeditor-4.1/asp.net/file_manager_json.ashx")',
                allowFileManager: true,
                width: "560px",
                items: [
    'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
    'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
                pasteType: 1  ,
                afterBlur: function () { this.sync(); }
            })
            editor1.readonly();
            prettyPrint();    });
      

  7.   


    我看到了 readonly(false)就是恢复成可编辑的。但是我加了readonly()后怎么不起作用的KindEditor.ready(function (K) {
            var editor1 = K.create('#JE00Warning_ProcessResult', {
                cssPath: '@Url.Content("~/Scripts/kindeditor-4.1/plugins/code/prettify.css")',
                uploadJson: '@Url.Content("~/Scripts/kindeditor-4.1/asp.net/upload_json.ashx")',
                fileManagerJson: '@Url.Content("~/Scripts/kindeditor-4.1/asp.net/file_manager_json.ashx")',
                allowFileManager: true,
                width: "560px",
                items: [
    'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
    'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
                pasteType: 1  ,
                afterBlur: function () { this.sync(); }
            })
            editor1.readonly();
            prettyPrint();    });
    editor1.readonly(true);