| 1 |
(function () { |
| 2 |
// Load plugin specific language pack |
| 3 |
// tinymce.PluginManager.requireLangPack('wpbc_tiny_quicktags'); |
| 4 |
|
| 5 |
tinymce.create('tinymce.plugins.wpbc_tinymce_btn_quicktags', { |
| 6 |
/** |
| 7 |
* Initializes the plugin, this will be executed after the plugin has been created. |
| 8 |
* This call is done before the editor instance has finished it's initialization so use the onInit event |
| 9 |
* of the editor instance to intercept that event. |
| 10 |
* |
| 11 |
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. |
| 12 |
* @param {string} url Absolute URL to where the plugin is located. |
| 13 |
*/ |
| 14 |
init: function (ed, url) { |
| 15 |
wpbc_init_tinymce_buttons( ed, url ); |
| 16 |
}, |
| 17 |
/** |
| 18 |
* Creates control instances based in the incomming name. This method is normally not |
| 19 |
* needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons |
| 20 |
* but you sometimes need to create more complex controls like listboxes, split buttons etc then this |
| 21 |
* method can be used to create those. |
| 22 |
* |
| 23 |
* @param {String} n Name of the control to create. |
| 24 |
* @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. |
| 25 |
* @return {tinymce.ui.Control} New control instance or null if no control was created. |
| 26 |
*/ |
| 27 |
createControl: function (n, cm) { |
| 28 |
return null; |
| 29 |
}, |
| 30 |
/** |
| 31 |
* Returns information about the plugin as a name/value array. |
| 32 |
* The current keys are longname, author, authorurl, infourl and version. |
| 33 |
* |
| 34 |
* @return {Object} Name/value array containing information about the plugin. |
| 35 |
*/ |
| 36 |
getInfo: function () { |
| 37 |
return { |
| 38 |
longname: "wpdevelop", |
| 39 |
author: 'wpdevelop', |
| 40 |
authorurl: 'https://wpbookingcalendar.com', |
| 41 |
infourl: 'https://wpbookingcalendar.com', |
| 42 |
version: "1.0" |
| 43 |
}; |
| 44 |
} |
| 45 |
}); |
| 46 |
|
| 47 |
// Register plugin |
| 48 |
tinymce.PluginManager.add('wpbc_tiny_quicktags', tinymce.plugins.wpbc_tinymce_btn_quicktags); |
| 49 |
})(); |