Javascript 使用CDN在Ckeditor中启用本地插件

Javascript 使用CDN在Ckeditor中启用本地插件,javascript,ckeditor,text-editor,Javascript,Ckeditor,Text Editor,我正在尝试启用像Youtube这样的本地插件 编辑器工作正常,没有javascript错误,但不会在工具栏中显示youtube图标 到目前为止,我的代码是这样的 <script src="https://cdn.ckeditor.com/4.6.2/full-all/ckeditor.js"></script> <script> CKEDITOR.plugins.addExternal( 'youtube', '/appx/ipage/ckeditor/

我正在尝试启用像Youtube这样的本地插件

编辑器工作正常,没有javascript错误,但不会在工具栏中显示youtube图标

到目前为止,我的代码是这样的

<script src="https://cdn.ckeditor.com/4.6.2/full-all/ckeditor.js"></script>
<script>

  CKEDITOR.plugins.addExternal( 'youtube', '/appx/ipage/ckeditor/plugins/youtube/', 'plugin.js' );
  CKEDITOR.replace( 'editor-full', {


        toolbar: [
            { name: 'others', items: [ 'Youtube' ] },
            { name: 'document', items: [ 'Print','Source' ] },
            { name: 'clipboard', items: [ 'Undo', 'Redo'] },
            { name: 'styles', items: [ 'Format', 'Font', 'FontSize' ] },
            { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CopyFormatting' ] },
            { name: 'colors', items: [ 'TextColor', 'BGColor' ] },
            { name: 'align', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
            { name: 'links', items: [ 'Link', 'Unlink' ] },
            { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] },
            { name: 'insert', items: [ 'Image', 'Table'] },
            { name: 'clipboard', items: ['Paste', 'PasteText', 'PasteFromWord'] }           
        ],

        customConfig: '',
        disallowedContent: 'img{width,height,float}',
        extraAllowedContent: 'img[width,height,align]',
        // Enabling extra plugins, available in the full-all preset: http://ckeditor.com/presets-all
        extraPlugins: 'tableresize,uploadimage,uploadfile,embed,autoembed',
        height:600,
        contentsCss: [ 'https://cdn.ckeditor.com/4.6.2/full-all/contents.css', '/appx/ipage/ckeditor/editors/article-editor/mystyles.css' ],

        // This is optional, but will let us define multiple different styles for multiple editors using the same CSS file.
        bodyClass: 'document-editor'
</script>

addExternal('youtube','/appx/ipage/CKEDITOR/plugins/youtube/,'plugin.js');
CKEDITOR.replace('editor full'{
工具栏:[
{name:'others',items:['Youtube']},
{name:'document',项:['Print','Source']},
{name:'clipboard',项:['Undo','Redo']},
{name:'style',items:['Format','Font','FontSize']},
{name:'basicstyles',项:['Bold','Italic','Underline','Strike','RemoveFormat','CopyFormatting'],
{name:'colors',items:['TextColor','BGColor']},
{name:'align',项:['JustifyLeft','justifCenter','justifRight','justifBlock']},
{name:'links',项:['Link','Unlink']},
{name:'段落',项目:['NumberedList','BulletedList','Outdent','Indent','Indent','Blockquote'],
{name:'insert',项:['Image','Table']},
{name:'clipboard',项:['Paste','PasteText','PasteFromWord']}
],
自定义配置:“”,
不允许的内容:“img{width,height,float}”,
extraAllowedContent:“img[宽度、高度、对齐]”,
//启用全部预设中提供的额外插件:http://ckeditor.com/presets-all
extraPlugins:'tableresize,uploadimage,uploadfile,embed,autoembed',
身高:600,
contentsCss:['https://cdn.ckeditor.com/4.6.2/full-all/contents.css“,”/appx/ipage/ckeditor/editors/article editor/mystyles.css'],
//这是可选的,但允许我们使用相同的CSS文件为多个编辑器定义多个不同的样式。
bodyClass:“文档编辑器”
我尝试在本地加载ckeditor.js,但出现图标错误

有什么想法吗

谢谢

步骤1

config.extraPlugins = 'youtube';
步骤2将图标添加到工具栏:

config.toolbar = [{ name: 'insert', items: ['Image', 'Youtube']}];
步骤3:配置

config.youtube_width = '640';

config.youtube_height = '480';

config.youtube_related = true;

config.youtube_older = false;