Guest User

CKEDITOR 4 Paypal Insert Plugin plugin.js

a guest
Aug 5th, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* This is my plugin.js code */
  2. (function()
  3. {
  4.  
  5.     CKEDITOR.plugins.add( 'paypal',
  6.     {  
  7.         requires: 'dialog',
  8.         lang: ['en'],
  9.         init: function( editor )
  10.         {
  11.             CKEDITOR.dialog.add( 'paypalChooseButton', CKEDITOR.getUrl( this.path + 'dialog/paypal.js' ) );
  12.             CKEDITOR.dialog.add( 'paypalCreateSingleButton', CKEDITOR.getUrl( this.path + 'dialog/paypalSingleButton.js' ) );
  13.             CKEDITOR.dialog.add( 'paypalCreateMultiButton', CKEDITOR.getUrl( this.path + 'dialog/paypalMultiButton.js' ) );
  14.  
  15.             editor.addCommand( 'paypalChooseButton',
  16.             {
  17.                 exec: function( editor )
  18.                 {
  19.                     editor.openDialog( 'paypalChooseButton' );
  20.                     return;
  21.                 }
  22.             });
  23.  
  24.             editor.ui.addButton( 'paypal',
  25.             {
  26.                 label: 'Insert PayPal Button',
  27.                 command:'paypalChooseButton',
  28.                 icon: this.path + 'img/paypal.png'
  29.             });
  30.            
  31.         }
  32.     });
  33.  
  34. })();
Add Comment
Please, Sign In to add comment