-galerie
-fmulticurl()
-infobox avec vignette, texte et lien wikipedia
+
-bouton shotcode flickr
-bugfixes
This commit is contained in:
2017-02-23 21:01:44 +01:00
parent eae1e44c01
commit edcfd078cf
6 changed files with 948 additions and 114 deletions

49
js/short-flickr.js Normal file
View File

@@ -0,0 +1,49 @@
(function() {
tinymce.create('tinymce.plugins.flickr', {
init : function(ed, url) {
ed.addButton('flickr', {
title : 'Add Flickr Shortcode',
image : url+'/flickr.png',
onclick : function() {
/*
[flickr url="https://www.flickr.com/photos/funnymac/27868468454/"]
[flickr pid="27868468454" caption="Volpe di Paradisio"]
[flickr pid="27868468454" version="Small"]
*/
var pid = prompt("Image Id", "");
if (pid == null || pid == ''){
var url = prompt("URL image", "");
}
var version = prompt("Taille", "");
var caption = prompt("Titre", "");
/**/
if (pid != null && pid != ''){
//if (album != null && album != '')
ed.execCommand('mceInsertContent', false, '[flickr pid="'+pid+'" version="'+version+'" caption="'+caption+'"]');
}
else if (url != null && url != ''){
//if (album != null && album != '')
ed.execCommand('mceInsertContent', false, '[flickr url="'+url+'" version="'+version+'" caption="'+caption+'"]');
}
}
});
},
createControl : function(n, cm) {
return null;
},
getInfo : function() {
return {
longname : "Flickr Shortcode",
author : 'Bruno',
authorurl : 'https://clicclac.info',
infourl : 'https://clicclac.info/wordpress/',
version : "1.0"
};
}
});
tinymce.PluginManager.add('flickr', tinymce.plugins.flickr);
})();