项目中 toolbar 是抽离出来一个单独文件配置工具栏控件的,toolbar.js:
const toolbar = [
'styleselect fontselect fontsizeselect formatselect searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript',
'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime table emoticons forecolor backcolor code codesample fullscreen'
]
export default toolbar
自定义行距,首先,在 toolbar中添加styleselect配置项:
加入之后,工具栏看到了格式配置项:
在初始化init方法中重写style,添加设置:
style_formats: [
{
title: "Line Height"<