2017-05-05 117 views
-2

我的CKEditor confiq.js如下:如何将YouTube添加插件CKEDITOR

CKEDITOR.editorConfig = function(config) { 
     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' } 
     ]; 
     config.extraPlugins = 'imageuploader'; 
     config.removeButtons = 'Underline,Subscript,Superscript'; 
     config.format_tags = 'p;h1;h2;h3;pre'; 
     config.removeDialogTabs = 'image:advanced;link:advanced'; 
     }; 

我要添加YouTube网址,并获得YouTube的vedio.please帮我

+0

RTFM请。你必须尝试 – Akintunde007

+0

什么布鲁。我开始对php。这是我的accadamic项目,我不是开发人员。@ Akin –

回答

0

请按照下列步骤操作:

  1. 下载YouTube压缩格式的插件。
  2. 将下载的文件解压缩到CKEditor的插件文件夹中。
  3. Addconfig.extraPlugins ='youtube';在你的配置(config.js)中。

confiq.js这样的代码:

CKEDITOR.editorConfig = function(config) { 
     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' } 
     ]; 
     config.extraPlugins = 'imageuploader'; 
     config.removeButtons = 'Underline,Subscript,Superscript'; 
     config.format_tags = 'p;h1;h2;h3;pre'; 
     config.removeDialogTabs = 'image:advanced;link:advanced'; 
     config.extraPlugins = 'youtube'; 
     config.youtube_width = '640'; 
     config.youtube_height = '480'; 
     config.youtube_responsive = true; 
     config.youtube_older = false; 
     config.youtube_related = true; 
     config.youtube_autoplay = false; 
     config.youtube_controls = true; 
     config.youtube_privacy = false; 

     }; 

运行代码U将得到。 ckeditor official

+0

它非常简单,并在http://ckeditor.com/addon/youtube。非常清楚地给出了通过这个链接。 –

+0

是它的工作.thanku –