use*_*290 1 javascript wysiwyg bootstrap-4
我正在尝试向 Summernote 编辑器添加字体大小,但没有成功。如果我删除['fontsize', ['8', '9', '10', '11', '12', '14', '18']],并使用,['fontsize', ['fontsize']],我只会得到一种尺寸,即 13。我正在尝试获取尺寸列表。
<script>
$(document).ready(function() {
$('#image_body').summernote({
toolbar: [
// [groupName, [list of button]]
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
//['fontsize', ['fontsize']],
['fontsize', ['8', '9', '10', '11', '12', '14', '18']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
});
Run Code Online (Sandbox Code Playgroud)
如果您想更改选项,则必须在属性中指定数组fontSizes。8下面的代码将显示带有选项、9、10、11、12和14的字体按钮18:
$('#summernote').summernote({
fontSizes: ['8', '9', '10', '11', '12', '14', '18'],
toolbar: [
// [groupName, [list of button]]
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
Run Code Online (Sandbox Code Playgroud)
您可以看到编辑在这里工作。
| 归档时间: |
|
| 查看次数: |
6061 次 |
| 最近记录: |