Sha256: d07fc895d530bfcc73ce86059dc7d700c71728f37b30044b7350cbc74014b9b7

Contents?: true

Size: 1.23 KB

Versions: 3

Compression:

Stored size: 1.23 KB

Contents

tinymce.PluginManager.add('caboose', function(editor, url) {
  
  editor.addButton('caboose_save', {
    text: 'Save',
    icon: false,
    onclick: function() {
      tinymce.activeEditor.plugins.autosave.storeDraft();
              
      var control = ModelBinder.tinymce_current_control();  
      if (!control) return;
      control.save();
      control.cancel();
    }
  });
  
  editor.addButton('caboose_cancel', {
    text: 'Cancel',
    icon: false,
    onclick: function() {
      tinymce.activeEditor.plugins.autosave.storeDraft();
      
      var control = ModelBinder.tinymce_current_control();  
      if (!control) return;  
      control.cancel();                      
    }
  });
  
  // Adds a menu item to the tools menu
  //editor.addMenuItem('example', {
  //    text: 'Example plugin',
  //    context: 'tools',
  //    onclick: function() {
  //        // Open window with a specific url
  //        editor.windowManager.open({
  //            title: 'TinyMCE site',
  //            url: 'http://www.tinymce.com',
  //            width: 800,
  //            height: 600,
  //            buttons: [{
  //                text: 'Close',
  //                onclick: 'close'
  //            }]
  //        });
  //    }
  //});
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
caboose-cms-0.3.6 app/assets/javascripts/tinymce/plugins/caboose/plugin.js
caboose-cms-0.3.5 app/assets/javascripts/tinymce/plugins/caboose/plugin.js
caboose-cms-0.3.4 app/assets/javascripts/tinymce/plugins/caboose/plugin.js