Advertisement
Guest User

justboil.me TinyMCE 4.x file_browser_callback

a guest
Jul 7th, 2013
869
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // How to make the justboil.me image upload plugin for TinyMCE 4.x work as the file_browser_callback function
  2. // This will close the image dialog and pop open the jbimage upload box instead...
  3. // Hope it helps someone else!
  4. // - Stephen
  5.  
  6. file_browser_callback: function(field_name, url, type, win) {
  7.          
  8.         tinymce.activeEditor.windowManager.close();
  9.  
  10.         tinymce.activeEditor.windowManager.open({
  11.             title: 'Upload an image',
  12.             file: '/js/tinymce/plugins/jbimages/dialog-v4.htm',
  13.             width: 350,
  14.             height: 135,
  15.             buttons: [{
  16.                 text: 'Upload',
  17.                 classes: 'widget btn primary first abs-layout-item',
  18.                 disabled: true,
  19.                 onclick: 'close'
  20.             }, {
  21.                 text: 'Close',
  22.                 onclick: 'close'
  23.             }]
  24.         });
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement