LLEARNING NOTES

技术 · 思考 · 实践 · 成长

首页/前端/正文

设置ueditor编辑器哪些可以显示的功能哪些不要的功能

前端108 次阅读
var ue = UE.getEditor('container', {
    initialFrameHeight: 400,
    scaleEnabled: true,
    autoHeightEnabled: false,
    toolbars: [[
        'fullscreen',
        'source',
        '|',
        'undo',
        'redo',
        '|',
        'bold',
        'italic',
        'underline',
        'strikethrough',
        '|',
        'forecolor',
        'backcolor',
        '|',
        'paragraph',
        'fontfamily',
        'fontsize',
        '|',
        'justifyleft',
        'justifycenter',
        'justifyright',
        'justifyjustify',
        '|',
        'insertorderedlist',
        'insertunorderedlist',
        '|',
        'link',
        'unlink',
        'simpleupload',
        'insertimage',
        'attachment',
        '|',
        'removeformat',
        'cleardoc',
        'preview'
    ]]
});


功能配置名称
全屏fullscreen
HTML源码source
撤销undo
重做redo
加粗bold
斜体italic
下划线underline
删除线strikethrough
字体颜色forecolor
背景颜色backcolor
段落格式paragraph
字体fontfamily
字号fontsize
左对齐justifyleft
居中justifycenter
右对齐justifyright
两端对齐justifyjustify
有序列表insertorderedlist
无序列表insertunorderedlist
超链接link
取消链接unlink
单图上传simpleupload
多图上传insertimage
编辑器附件attachment
表格inserttable
删除表格deletetable
清除格式removeformat
清空文档cleardoc
预览preview
打印print

不建议给普通通知开放:

  • source:可直接输入HTML。

  • insertvideo、music:可能嵌入外部内容。

  • insertframe:可能嵌入第三方网页。

  • webapp、map、gmap。

  • attachment:因为页面已经单独实现多附件上传。

  • snapscreen:依赖额外的截图组件。

  • print:后台一般不需要。

  • cleardoc:容易误清空内容。


只要认真对待生活,终有一天,你的每一份努力,都将绚烂成花。

评论交流

理性讨论,共同进步
验证码

相关文章

继续阅读