Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- tinymce.create('tinymce.plugins.wpfilebase', {
- init: function(ed, url) {
- ed.addButton('wpfbInsertTag', {
- title: 'WP-Filebase',
- image: url + '/images/btn.gif',
- onclick: (function() {
- var postId = '';
- try { postId = tinymce.DOM.get("post_ID").value; } catch(ex) {}
- ed.windowManager.open(
- {file: (ajaxurl.replace("admin-ajax.php","admin.php?wpfilebase-screen=editor-plugin" ).replace('editor-plugin?','editor-plugin&')+'&post_id='+postId+'&content='+encodeURIComponent(tinyMCE.activeEditor.selection.getContent())), title:'WP-Filebase', width: 810, height: 400, inline: 1},
- {plugin_url: url}
- );
- })
- });
- },
- createControl: function(n, cm) { return null; },
- getInfo: function() {
- return {
- longname: 'WP-Filebase',
- author: 'Fabian Schlieper',
- authorurl: 'http://fabi.me/',
- infourl: 'http://fabi.me/wp-filebase/',
- version: '1.0'
- };
- }//
- });
- tinymce.PluginManager.add('wpfilebase', tinymce.plugins.wpfilebase);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement