【发布时间】:2020-01-31 11:55:50
【问题描述】:
我想在 Summernote 的工具栏中添加功能。我想以微调器或editText的形式控制字母间距,但我不知道在哪里添加它。试了其他插件也看不懂。
// toolbar
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['fontname', ['fontname']],
['color', ['color']],
['fontSize', ['fontSize']],
['letterSpace', ['letterSpace']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video']],
['view', ['fullscreen', 'codeview', 'help']]
]
this.fontName = this.wrapCommand(function (value) {
return _this.fontStyling('font-family', "\'" + value + "\'");
});
this.fontSize = this.wrapCommand(function (value) {
return _this.fontStyling('font-size', value + 'px');
});
this.letterSpace = this.wrapCommand(function (value) {
return _this.fontStyling('letter-spacing', value + 'px');
});
【问题讨论】:
标签: javascript html summernote