config.extraPlugins ='音频&#39 ;;不在ckedtior工作

时间:2017-05-10 03:02:54

标签: javascript angularjs plugins ckeditor

我想添加插件audio html 5和video html 5

代码(config.extraPlugins)无法在ckedtior中运行

代码(config.extraPlugins)在文件配置中写入消失工具栏全部无法正常工作

enter image description here

但是删除代码(config.extraPlugins)显示工具栏和工作

enter image description here



CKEDITOR.editorConfig = function( config ) {

				 config.extraPlugins = 'Audio';
                config.extraPlugins = 'html5video';

		// Define changes to default configuration here.
		// For complete reference see:
		// http://docs.ckeditor.com/#!/api/CKEDITOR.configuration
			config.language = 'en';

		// The toolbar groups arrangement, optimized for two toolbar rows.
		config.toolbarGroups = [
			{ name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
			{ name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
			{ name: 'links' },
			{ name: 'insert' },
			{ name: 'forms' },
			{ name: 'tools' },
			{ name: 'document',	   groups: [ 'mode', 'document', 'doctools' ] },
			{ name: 'others' },
			'/',
			{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
			{ name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
			{ name: 'styles' },
			{ name: 'colors' },
			{ name: 'about' }
		];
		

		// Remove some buttons provided by the standard plugins, which are
		// not needed in the Standard(s) toolbar.
		config.removeButtons = 'Underline,Subscript,Superscript';

		// Set the most common block elements.
		config.format_tags = 'p;h1;h2;h3;pre';
		// Simplify the dialog windows.
		config.removeDialogTabs = 'image:advanced;link:advanced';
		 config.filebrowserBrowseUrl = 'ckeditor/kcfinder/browse.php?opener=ckeditor&type=files';
	   config.filebrowserImageBrowseUrl = 'ckeditor/kcfinder/browse.php?opener=ckeditor&type=images';
	   config.filebrowserFlashBrowseUrl = 'ckeditor/kcfinder/browse.php?opener=ckeditor&type=flash';
	   config.filebrowserUploadUrl = 'ckeditor/kcfinder/upload.php?opener=ckeditor&type=files';
	   config.filebrowserImageUploadUrl = 'ckeditor/kcfinder/upload.php?opener=ckeditor&type=images';
	   config.filebrowserFlashUploadUrl = 'ckeditor/kcfinder/upload.php?opener=ckeditor&type=flash';
	};




1 个答案:

答案 0 :(得分:0)

您只能使用config.extraPlugins一次,否则将覆盖声明。如果要添加多个额外的插件,则extraPlugins选项需要使用逗号分隔的插件列表。您的情况应该是:

config.extraPlugins = 'Audio,html5video';

CKEditor的文档:https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins