editor_plugin.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. (function ($) {
  2. tinymce.create('tinymce.plugins.video_filter', {
  3. init : function(ed, url) {
  4. // Register commands
  5. ed.addCommand('mceVideoFilter', function() {
  6. ed.windowManager.open({
  7. file : Drupal.settings.video_filter.url.wysiwyg_tinymce,
  8. width : 580,
  9. height : 480,
  10. inline : true,
  11. scrollbars : 1,
  12. popup_css : false
  13. }, {
  14. plugin_url : url
  15. });
  16. });
  17. // Register buttons
  18. ed.addButton('video_filter', {
  19. title : 'Video filter',
  20. cmd : 'mceVideoFilter',
  21. image : url + '/images/video_filter.png'
  22. });
  23. },
  24. getInfo : function() {
  25. return {
  26. longname : 'Video Filter',
  27. author : 'Video Filter',
  28. authorurl : 'http://drupal.org/project/video_filter',
  29. infourl : 'http://drupal.org/project/video_filter',
  30. version : tinymce.majorVersion + "." + tinymce.minorVersion
  31. };
  32. }
  33. });
  34. // Register plugin
  35. tinymce.PluginManager.add('video_filter', tinymce.plugins.video_filter);
  36. })(jQuery);