gpt4 book ai didi

javascript - 如何使tinymce输入只读

转载 作者:行者123 更新时间:2023-12-03 01:37:05 24 4
gpt4 key购买 nike

我想将tinymce输入设置为只读。我尝试过下面的代码。请帮我解决这个问题。

tinymce.init({
selector: '#deliberations',
menubar: false,
readonly: true,
branding: false,
height: 100,
max_height: 400,
theme: 'modern',
toolbar: false,
toolbar_items_size: 'small',
plugins: ['advlist autolink lists link image charmap print preview hr anchor pagebreak','searchreplace wordcount visualblocks visualchars code fullscreen','insertdatetime media nonbreaking save table contextmenu directionality','emoticons template paste textcolor colorpicker textpattern imagetools codesample toc help'],

toolbar1: 'insert | undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image print preview media | forecolor backcolor emoticons | fullscreen | table',

image_advtab: true,
templates: [{
title: 'Test template 1',
content: 'Test 1'
},
{
title: 'Test template 2',
content: 'Test 2'

}
],
content_css: [

]

});

最佳答案

如果您使用的是 4.x 版本,请删除 readonly: true 选项并尝试

setup: function (editor) {
editor.setMode("readonly")
},

http://fiddle.tinymce.com/Lugaab/2

关于javascript - 如何使tinymce输入只读,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51020378/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com