【发布时间】:2016-06-06 21:01:47
【问题描述】:
我正在使用 Summernote 在基本 CMS 中进行编辑。这是我正在使用的代码:
$(document).ready(function() {
$("#summernote").summernote({
height: 600,
styleWithSpan: false,
toolbar: [
['style', ['bold', 'italic', 'underline']],
['para', ['ul', 'ol', 'paragraph','style']],
['view', ['codeview']],
['insert', ['mypicture','link','table','hr']]
],
buttons: {
mypicture: PictureButton
},
disableDragAndDrop: true
});
$('#save').click(function(){
var mysave = $('#summernote').summernote('code');
$('#content').val(mysave);
});
});
在工具栏中,我使用['para',['style']] 允许用户选择标题/段落样式,例如H1 和P。
有没有办法将下拉菜单限制为只允许他们使用 H1、H2 和 P?
【问题讨论】:
标签: javascript summernote