| Server IP : 213.186.33.4 / Your IP : 216.73.216.193 Web Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : awebpaca ( 35430) PHP Version : 8.5.0 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/awebpaca/lessarmoudes/components/com_jce/editor/tiny_mce/plugins/microdata/ |
Upload File : |
/* Microdata - 1.0.0beta2 | 09 July 2013 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2013 Ryan Demmer. All rights reserved | GNU/GPL Version 2 - http://www.gnu.org/licenses/gpl-2.0.html */
(function(){var each=tinymce.each,extend=tinymce.extend;tinymce.create('tinymce.plugins.MicrodataPlugin',{init:function(ed,url){var self=this;this.editor=ed;function isMicrodata(n){return n.getAttribute('itemprop')||n.getAttribute('data-microdata-itemprop');}
ed.addCommand('mceMicrodata',function(){var se=ed.selection,n=se.getNode();ed.windowManager.open({file:ed.getParam('site_url')+'index.php?option=com_jce&view=editor&layout=plugin&plugin=microdata',width:400+ed.getLang('microdata.delta_width',0),height:300+ed.getLang('microdata.delta_height',0),inline:1,popup_css:false},{plugin_url:url});});ed.addButton('microdata',{title:'microdata.desc',cmd:'mceMicrodata',image:url+'/img/microdata.png'});ed.onNodeChange.add(function(ed,cm,n,co){cm.setDisabled('microdata',co);});ed.onInit.add(function(ed){if(!ed.settings.compress.css){ed.dom.loadCSS(url+"/css/content.css");}});ed.onBeforeSetContent.add(function(ed,o){o.content=o.content.replace(/<(\w+)([^>]+)\s(itemscope|itemtype|itemid|itemprop|itemref)([^>]+)>/gi,'<$1$2 data-microdata-$3$4>');});ed.onPreInit.add(function(){ed.serializer.addAttributeFilter('data-microdata-itemscope,data-microdata-itemtype,data-microdata-itemid,data-microdata-itemprop,data-microdata-itemref',function(nodes,name){var i=nodes.length,node,k;while(i--){node=nodes[i],k=name.replace('data-microdata-','');if(k=='itemtype'){node.attr('itemscope','itemscope');}
node.attr(k,node.attr(name));node.attr(name,null);}});ed.parser.addAttributeFilter('itemscope,itemtype,itemid,itemprop,itemref',function(nodes,name){var i=nodes.length,node,v;while(i--){node=nodes[i];v=node.attr(name);if(name=='itemscope'){v='itemscope';}
node.attr('data-microdata-'+name,v);node.attr(name,null);}});if(ed.settings.schema!=="html5"){ed.schema.addValidElements('@[itemscope=itemscope|itemtype|itemid|itemprop|itemref]');each(ed.schema.elements,function(v,k){if(/\w+/.test(k)&&v){extend(v.attributes,{'itemscope':{'defaultValue':'itemscope'},'itemtype':{},'itemid':{},'itemprop':{},'itemref':{}});v.attributesOrder.concat(v.attributesOrder,['itemscope','itemtype','itemid','itemprop','itemref']);}});}
ed.formatter.register({'microdata':{inline:'span',onformat:function(elm,fmt,vars){each(vars,function(value,key){ed.dom.setAttrib(elm,key,value);});}},'microdata-remove':{selector:'span',attributes:['data-microdata-itemprop'],remove:'emtpy'}});});},getInfo:function(){return{longname:'Microdata',author:'Ryan Demmer',authorurl:'http://www.joomlacontenteditor.net',infourl:'http://www.joomlacontenteditor.net',version:'1.0.0beta2'};}});tinymce.PluginManager.add('microdata',tinymce.plugins.MicrodataPlugin);})();