-galerie -fmulticurl() -infobox avec vignette, texte et lien wikipedia + -bouton shotcode flickr -bugfixes
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
(function() {
|
|
tinymce.create('tinymce.plugins.zenphoto', {
|
|
init : function(ed, url) {
|
|
ed.addButton('zenphoto', {
|
|
title : 'Add Zenphoto Shortcode',
|
|
image : url+'/zenphoto.png',
|
|
onclick : function() {
|
|
var album = prompt("Album", "");
|
|
var image = prompt("Image", "");
|
|
|
|
if (image != null && image != ''){
|
|
if (album != null && album != '')
|
|
ed.execCommand('mceInsertContent', false, '[zenphoto album="'+album+'" image="'+image+'"]');
|
|
/*else
|
|
ed.execCommand('mceInsertContent', false, '[zenphoto'+text+'[/recent-posts]');*/
|
|
}
|
|
else{
|
|
if (album != null && album != '')
|
|
ed.execCommand('mceInsertContent', false, '[zenphoto album="'+album+'"]');
|
|
/*else
|
|
ed.execCommand('mceInsertContent', false, '[zenphoto]');*/
|
|
}
|
|
}
|
|
});
|
|
},
|
|
createControl : function(n, cm) {
|
|
return null;
|
|
},
|
|
getInfo : function() {
|
|
return {
|
|
longname : "Zenphoto Shortcode",
|
|
author : 'Bruno',
|
|
authorurl : 'https://clicclac.info',
|
|
infourl : 'https://clicclac.info/wordpress/',
|
|
version : "1.0"
|
|
};
|
|
}
|
|
});
|
|
tinymce.PluginManager.add('zenphoto', tinymce.plugins.zenphoto);
|
|
})(); |