PluginProbe
Post Snippets – Custom WordPress Code Snippets Customizer / 1.9.1
Post Snippets – Custom WordPress Code Snippets Customizer v1.9.1
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 1.9.1, at tinymce/editor_plugin.js

63 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Docu : http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x#Creating_your_own_plugins
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 // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
18
19 ed.addCommand('mcepost_snippets', function() {
20 muppCanv = ed;
21 caller = 'visual';
22 jQuery( "#post-snippets-dialog" ).dialog( "open" );
23 /* ed.windowManager.open({
24 file : url + '/window.php',
25 width : 360 + ed.getLang('post_snippets.delta_width', 0),
26 height : 210 + ed.getLang('post_snippets.delta_height', 0),
27 inline : 1
28 }, {
29 plugin_url : url // Plugin absolute URL
30 });
31 */ });
32
33 // Register example button
34 ed.addButton('post_snippets', {
35 title : 'post_snippets.desc',
36 cmd : 'mcepost_snippets',
37 image : url + '/post-snippets.gif'
38 });
39 },
40
41 /**
42 * Returns information about the plugin as a name/value array.
43 * The current keys are longname, author, authorurl, infourl and version.
44 *
45 * @return {Object} Name/value array containing information about the plugin.
46 */
47 getInfo : function() {
48 return {
49 longname : 'post_snippets',
50 author : 'Johan Steen',
51 authorurl : 'http://johansteen.se/',
52 infourl : 'http://wpstorm.net/wordpress-plugins/post-snippets/',
53 version : "1.1"
54 };
55 }
56 });
57
58 // Register plugin
59 tinymce.PluginManager.add('post_snippets', tinymce.plugins.post_snippets);
60 })();
61
62
63