| 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/styleselect/ |
Upload File : |
/* JCE Editor - 2.4.5 | 09 December 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,each=tinymce.each,Cookie=tinymce.util.Cookie,explode=tinymce.explode;tinymce.create('tinymce.plugins.StyleSelectPlugin',{init:function(ed,url){var self=this;this.editor=ed;ed.onNodeChange.add(function(ed,cm){var c=cm.get('styleselect'),formatNames=[],matches;if(c){formatNames=[];each(c.items,function(item){formatNames.push(item.value);});matches=ed.formatter.matchAll(formatNames);c.select(matches[0]);tinymce.each(matches,function(match,index){if(index>0){c.mark(match);}});}});},createControl:function(n,cf){var ed=this.editor;switch(n){case"styleselect":if(ed.getParam('styleselect_stylesheet')!==false||ed.getParam('style_formats')||ed.getParam('theme_advanced_styles')){return this._createStyleSelect();}
break;}},_createStyleSelect:function(n){var self=this,ed=this.editor,ctrlMan=ed.controlManager,ctrl,PreviewCss=tinymce.util.PreviewCss;ctrl=ctrlMan.createListBox('styleselect',{title:'advanced.style_select',onselect:function(name){var matches,formatNames=[],removedFormat;each(ctrl.items,function(item){formatNames.push(item.value);});ed.focus();ed.undoManager.add();matches=ed.formatter.matchAll(formatNames);tinymce.each(matches,function(match){if(!name||match===name){if(match){ed.formatter.remove(match);}
removedFormat=true;}});if(!removedFormat){ed.formatter.apply(name);}
ed.undoManager.add();ed.nodeChanged();return false;}});ed.onPreInit.add(function(){var counter=0,formats=ed.getParam('style_formats'),styles=ed.getParam('theme_advanced_styles','','hash');if(formats){each(formats,function(fmt){var name,keys=0;each(fmt,function(){keys++;});if(keys>1){name=fmt.name=fmt.name||'style_'+(counter++);ed.formatter.register(name,fmt);ctrl.add(fmt.title,name,{style:function(){return new PreviewCss(ed,fmt);}});}else{ctrl.add(fmt.title);}});}
if(styles){each(styles,function(val,key){var name,fmt;if(val){name='style_'+(counter++);fmt={inline:'span',classes:val,selector:'*'};ed.formatter.register(name,fmt);ctrl.add(ed.translate(key),name,{style:function(){return new PreviewCss(ed,fmt);}});}});}});return ctrl;}});tinymce.PluginManager.add('styleselect',tinymce.plugins.StyleSelectPlugin,['importcss']);})();