PluginProbe
Post Snippets – Custom WordPress Code Snippets Customizer / 4.2.2
Post Snippets – Custom WordPress Code Snippets Customizer v4.2.2
4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.1 1.7.2 1.7.3 1.8 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.8.9.1 1.8.9.2 1.9 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 All 115 releases
post-snippets / tinymce / editor_plugin.js

editor_plugin.js in Post Snippets – Custom WordPress Code Snippets Customizer 4.2.2, at tinymce/editor_plugin.js

55 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Docu : http://www.tinymce.com/wiki.php/API3:tinymce.api.3.x
2
3 (function() {
4 // Load plugin specific language pack
5 tinymce.PluginManager.requireLangPack('post_snippets');
6
7 tinymce.create('tinymce.plugins.post_snippets', {
8 /**
9 * Initializes the plugin, this will be executed after the plugin has been created.
10 * This call is done before the editor instance has finished it's initialization so use the onInit event
11 * of the editor instance to intercept that event.
12 *
13 * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
14 * @param {string} url Absolute URL to where the plugin is located.
15 */
16 init : function(ed, url) {
17
18 // Register the command so that it can be invoked from the button
19 ed.addCommand('mce_post_snippets', function() {
20 post_snippets_canvas = ed;
21 post_snippets_caller = 'visual';
22 jQuery( "#post-snippets-dialog" ).dialog( "open" );
23 });
24
25 // Register example button
26 ed.addButton('post_snippets', {
27 title : 'Post Snippets',
28 cmd : 'mce_post_snippets',
29 image : url + '/post-snippets.gif'
30 });
31 },
32
33 /**
34 * Returns information about the plugin as a name/value array.
35 * The current keys are longname, author, authorurl, infourl and version.
36 *
37 * @return {Object} Name/value array containing information about the plugin.
38 */
39 getInfo : function() {
40 return {
41 longname : 'Post Snippets',
42 author : 'GreenTreeLabs',
43 authorurl : 'https://www.postsnippets.com/',
44 infourl : 'https://www.postsnippets.com/',
45 version : '1.9'
46 };
47 }
48 });
49
50 // Register plugin
51 tinymce.PluginManager.add('post_snippets', tinymce.plugins.post_snippets);
52 })();
53
54
55