Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. (function() {
  2. tinymce.PluginManager.requireLangPack('pullquotes');
  3. tinymce.create('tinymce.plugins.PullQuotesPlugin', {
  4. init : function(ed, url) {
  5.  
  6. tinyMCE.activeEditor.execCommand('mcePullQuote');
  7. ed.addCommand('mcePullQuotes', function() {
  8. ed.windowManager.open({
  9. file : url + '/dialog.htm',
  10. width : 480 + parseInt(ed.getLang('style.delta_width', 0)),
  11. height : 340 + parseInt(ed.getLang('style.delta_height', 0)),
  12. inline : 1
  13. }, {
  14. plugin_url : url, // Plugin absolute URL
  15. some_custom_arg : 'custom arg' // Custom argument
  16. });
  17. });
  18.  
  19. ed.addButton('pullquotes', {
  20. title : 'PullQuotes',
  21. text: 'PQ',
  22. cmd : 'mcePullQuotes',
  23. icon: false,
  24. image : url + '/img/example.gif'
  25. });
  26.  
  27. },
  28.  
  29. getInfo : function() {
  30. return {
  31. longname : 'Pull Quotes plugin',
  32. author : 'Adrian Cotter',
  33. authorurl : 'adrian.cotter@sierraclub.org',
  34. infourl : 'http://www.sierraclub.org',
  35. version : "1.0"
  36. };
  37. }
  38. });
  39.  
  40. tinymce.PluginManager.add('pullquotes', tinymce.plugins.PullQuotesPlugin);
  41. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement