美文网首页
ckeditor如何设置placeholder文字提示

ckeditor如何设置placeholder文字提示

作者: BestMian | 来源:发表于2018-08-21 16:44 被阅读8次

使用富文本编辑器Ckeditor的时候,发现在textarea上设置placeholder文字提示并无效果。
后来上谷歌查阅资料才发现,它需要添加一个confighelper插件(放在/plugins目录下),才配置placeholder属性。

Ckeditor版本是(version:"4.10.1"),下面是参数配置:

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';
    config.extraPlugins='confighelper'; 
    config.placeholder = 'Type here...';
};

参考

CKEditor placeholder text doesn't work (config.js)

富文本编辑器 CKeditor 配置使用

下载

Configuration Helper

相关文章

网友评论

      本文标题:ckeditor如何设置placeholder文字提示

      本文链接:https://www.haomeiwen.com/subject/lnejiftx.html