github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/public/libs/tinymce/plugins/jbimages/plugin.js (about)

     1  /**
     2   * Justboil.me - a TinyMCE image upload plugin
     3   * jbimages/plugin.js
     4   *
     5   * Released under Creative Commons Attribution 3.0 Unported License
     6   *
     7   * License: http://creativecommons.org/licenses/by/3.0/
     8   * Plugin info: http://justboil.me/
     9   * Author: Viktor Kuzhelnyi
    10   *
    11   * Version: 2.3 released 23/06/2013
    12   */
    13  
    14  tinymce.PluginManager.add('jbimages', function(editor, url) {
    15  	
    16  	function jbBox() {
    17  		editor.windowManager.open({
    18  			title: 'Upload an image',
    19  			file : url + '/dialog-v4.htm',
    20  			width : 350,
    21  			height: 135,
    22  			buttons: [{
    23  				text: 'Upload',
    24  				classes:'widget btn primary first abs-layout-item',
    25  				disabled : true,
    26  				onclick: 'close'
    27  			},
    28  			{
    29  				text: 'Close',
    30  				onclick: 'close'
    31  			}]
    32  		});
    33  	}
    34  	
    35  	// Add a button that opens a window
    36  	editor.addButton('jbimages', {
    37  		tooltip: 'Upload an image',
    38  		icon : 'image',
    39  		text: 'Upload',
    40  		onclick: jbBox
    41  	});
    42  
    43  	// Adds a menu item to the tools menu
    44  	editor.addMenuItem('jbimages', {
    45  		text: 'Upload image',
    46  		icon : 'image',
    47  		context: 'insert',
    48  		onclick: jbBox
    49  	});
    50  });