first commit

This commit is contained in:
alazhar
2020-01-02 23:15:16 +07:00
commit eda9661806
3433 changed files with 595883 additions and 0 deletions

View File

@ -0,0 +1 @@
(function(){tinymce.create("tinymce.plugins.wpLink",{init:function(a,b){var c=true;a.addCommand("WP_Link",function(){if(c){return}a.windowManager.open({id:"wp-link",width:480,height:"auto",wpDialog:true,title:a.getLang("advlink.link_desc")},{plugin_url:b})});a.addButton("link",{title:"advanced.link_desc",cmd:"WP_Link"});a.onNodeChange.add(function(e,d,g,f){c=f&&g.nodeName!="A"})},getInfo:function(){return{longname:"WordPress Link Dialog",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wplink",tinymce.plugins.wpLink)})();

View File

@ -0,0 +1,59 @@
(function() {
tinymce.create('tinymce.plugins.wpLink', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
var disabled = true;
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
ed.addCommand('WP_Link', function() {
if ( disabled )
return;
ed.windowManager.open({
id : 'wp-link',
width : 480,
height : "auto",
wpDialog : true,
title : ed.getLang('advlink.link_desc')
}, {
plugin_url : url // Plugin absolute URL
});
});
// Register example button
ed.addButton('link', {
title : 'advanced.link_desc',
cmd : 'WP_Link'
});
ed.onNodeChange.add(function(ed, cm, n, co) {
disabled = co && n.nodeName != 'A';
});
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'WordPress Link Dialog',
author : 'WordPress',
authorurl : 'http://wordpress.org',
infourl : '',
version : "1.0"
};
}
});
// Register plugin
tinymce.PluginManager.add('wplink', tinymce.plugins.wpLink);
})();