ckeditor4 php,CKEditor 4自定义下拉列表
一切都是關于
editor.ui.addRichCombo(
JSFiddle):
CKEDITOR.replace( 'editor', {
toolbarGroups: [
{ name: 'mode' },
{ name: 'basicstyles' }
],
on: {
pluginsLoaded: function() {
var editor = this,
config = editor.config;
editor.ui.addRichCombo( 'my-combo', {
label: 'My Dropdown Label',
title: 'My Dropdown Title',
toolbar: 'basicstyles,0',
panel: {
css: [ CKEDITOR.skin.getPath( 'editor' ) ].concat( config.contentsCss ),
multiSelect: false,
attributes: { 'aria-label': 'My Dropdown Title' }
},
init: function() {
this.startGroup( 'My Dropdown Group #1' );
this.add( 'foo', 'Foo!' );
this.add( 'bar', 'Bar!' );
this.startGroup( 'My Dropdown Group #2' );
this.add( 'ping', 'Ping!' );
this.add( 'pong', 'Pong!' );
},
onClick: function( value ) {
editor.focus();
editor.fire( 'saveSnapshot' );
editor.insertHtml( value );
editor.fire( 'saveSnapshot' );
}
} );
}
}
} );
總結
以上是生活随笔為你收集整理的ckeditor4 php,CKEditor 4自定义下拉列表的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: nestjs配置MySQL数据库,Nes
- 下一篇: matlab涡轮机建模,数学实验大作业-