Javascript t选择“禁用”或“只读”

Javascript t选择“禁用”或“只读”,javascript,tinymce,Javascript,Tinymce,我看了这么多不同的答案和文档,我找不到合适的属性来使用。我已在此处初始化编辑: $(document).ready(function () { if($("#elm1").length > 0){ tinymce.init({

我看了这么多不同的答案和文档,我找不到合适的属性来使用。我已在此处初始化编辑:

$(document).ready(function () {
                            if($("#elm1").length > 0){
                                tinymce.init({
                                                                        content_css : "/css/style.css",
                                    selector: "textarea#elm1",
                                    theme: "modern",
                                    height:300,
                                    plugins: [
                                        "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
                                        "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                                        "save table contextmenu directionality emoticons template paste textcolor"
                                    ],
                                    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons",
                                    style_formats: [
                                        {title: \'Bold text\', inline: \'b\'},
                                        {title: \'Red text\', inline: \'span\', styles: {color: \'#ff0000\'}},
                                        {title: \'Red header\', block: \'h1\', styles: {color: \'#ff0000\'}},
                                        {title: \'Example 1\', inline: \'span\', classes: \'example1\'},
                                        {title: \'Example 2\', inline: \'span\', classes: \'example2\'},
                                        {title: \'Table styles\'},
                                        {title: \'Table row 1\', selector: \'tr\', classes: \'tablerow1\'}
                                    ]
                                });
                            }
                        });
事件发生后,我想将编辑器设置为不可编辑。我目前有以下几行

tinymce.get(“elm1”).setMode(“只读”)

我很确定我得到了元素,因为在其他地方我使用的是
tinymce.get(“elm1”).setContent(…)工作正常。我使用的是4.4版。*有人知道什么是正确的属性吗