ckeditor4.x toolbar 工具欄配置

  1. 首頁你要下載full版本的 而不是stander版本編輯器

  2. 你能夠在ckeditor\samples\plugins\toolbar 目錄下方找到官方說明工具

  3. 官方說明有2種方式1toolbar 2 toolbargroupgoogle


如下是我google翻譯的
插件

此示例演示頁面編輯器加載滿工具欄(全部註冊按鈕),若是當前編輯器的配置修改默認設置,也與編輯修改工具欄。 翻譯

因爲CKEditor的4有兩種方式來配置的工具欄按鈕。 
code

由config.toolbar 
ip

你能夠明確地定義哪些按鈕顯示在哪些羣體,哪些秩序。這是更精確的設置,但不靈活。若是新添加的插件添加本身的按鈕,您就必須手動添加到您的config.toolbar設置爲好。 
it

要添加自定義工具欄設置一個CKEditor的實例,插入到您的代碼以下JavaScript調用:ast

CKEDITOR.replace( 'textarea_id', {	toolbar: [
		{ name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates' ] },	// Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
		[ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ],			// Defines toolbar group without name.
		'/',																					// Line break - next group will be placed in new line.
		{ name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
	]
});
相關文章
相關標籤/搜索