]> git.immae.eu Git - perso/Immae/Projets/packagist/piedsjaloux-ckeditor-component.git/blobdiff - release/ckeditor.js
Change audio plugin
[perso/Immae/Projets/packagist/piedsjaloux-ckeditor-component.git] / release / ckeditor.js
index f566561046b4c9c8036e2293f1a4bac37c04b7b5..de0387726a279c12ff3245e38bd77be8eb65905b 100644 (file)
@@ -1067,14 +1067,13 @@ e=c.getContentElement("general","align").getValue(),h=null,b=null,i=!1,k=c.getPa
 i=!1);l(f,k,h,b,i,g,e,d);d.setData("oembed",f);d.setData("resizeType",g);d.setData("align",e);d.setData("maxWidth",h);d.setData("maxHeight",b)}},{type:"hbox",widths:["50%","50%"],children:[{id:"resizeType",type:"select",label:a.lang.oembed.resizeType,"default":"noresize",setup:function(a){a.data.resizeType&&this.setValue(a.data.resizeType)},items:[[a.lang.oembed.noresize,"noresize"],[a.lang.oembed.responsive,"responsive"],[a.lang.oembed.custom,"custom"]],onChange:k},{type:"hbox",id:"maxSizeBox",widths:["120px",
 "120px"],style:"float:left;position:absolute;left:58%;width:200px",children:[{type:"text",width:"100px",id:"maxWidth","default":null!=a.config.oembed_maxWidth?a.config.oembed_maxWidth:"560",label:a.lang.oembed.maxWidth,title:a.lang.oembed.maxWidthTitle,setup:function(a){a.data.maxWidth&&this.setValue(a.data.maxWidth)}},{type:"text",id:"maxHeight",width:"120px","default":null!=a.config.oembed_maxHeight?a.config.oembed_maxHeight:"315",label:a.lang.oembed.maxHeight,title:a.lang.oembed.maxHeightTitle,
 setup:function(a){a.data.maxHeight&&this.setValue(a.data.maxHeight)}}]},{type:"hbox",id:"sizeBox",widths:["120px","120px"],style:"float:left;position:absolute;left:58%;width:200px",children:[{type:"text",id:"width",width:"100px","default":null!=a.config.oembed_maxWidth?a.config.oembed_maxWidth:"560",label:a.lang.oembed.width,title:a.lang.oembed.widthTitle,setup:function(a){a.data.maxWidth&&this.setValue(a.data.maxWidth)}},{type:"text",id:"height",width:"120px","default":null!=a.config.oembed_maxHeight?
-a.config.oembed_maxHeight:"315",label:a.lang.oembed.height,title:a.lang.oembed.heightTitle,setup:function(a){a.data.maxHeight&&this.setValue(a.data.maxHeight)}}]}]},{type:"hbox",id:"alignment",children:[{id:"align",type:"radio",items:[[a.lang.oembed.none,"none"],[a.lang.common.alignLeft,"left"],[a.lang.common.alignCenter,"center"],[a.lang.common.alignRight,"right"]],label:a.lang.common.align,setup:function(a){this.setValue(a.data.align)}}]}]}]}})}})})();(function(){CKEDITOR.plugins.add("Audio",{lang:["en","es"],getPlaceholderCss:function(){return"img.cke_audio{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;background-color:gray;border: 1px solid #a9a9a9;width: 80px;height: 80px;}"},onLoad:function(){CKEDITOR.addCss&&CKEDITOR.addCss(this.getPlaceholderCss())},init:function(b){var c=b.lang.audio;"undefined"==typeof b.element.data?alert('The "audio" plugin requires CKEditor 3.5 or newer'):
-(CKEDITOR.dialog.add("audio",this.path+"dialogs/audio.js"),b.addCommand("Audio",new CKEDITOR.dialogCommand("audio")),b.ui.addButton("Audio",{label:c.toolbar,command:"Audio",icon:this.path+"images/icon.png"}),b.addCss&&b.addCss(this.getPlaceholderCss()),b.addMenuItems&&b.addMenuItems({audio:{label:c.properties,command:"Audio",group:"flash"}}),b.on("doubleclick",function(a){var b=a.data.element;b.is("img")&&"audio"==b.data("cke-real-element-type")&&(a.data.dialog="audio")}),b.contextMenu&&b.contextMenu.addListener(function(a){if(a&&
-a.is("img")&&!a.isReadOnly()&&"audio"==a.data("cke-real-element-type"))return{audio:CKEDITOR.TRISTATE_OFF}}),CKEDITOR.dtd.$empty["cke:source"]=1,CKEDITOR.dtd.$empty.source=1,b.lang.fakeobjects.audio=c.fakeObject)},afterInit:function(b){var c=b.dataProcessor;(c&&c.dataFilter).addRules({elements:{$:function(a){if("audio"==a.name){a.name="cke:audio";for(var d=0;d<a.children.length;d++)"source"==a.children[d].name&&(a.children[d].name="cke:source");var d=b.createFakeParserElement(a,"cke_audio","audio",
-!1),c=d.attributes.style||"",e=a.attributes.width,f=a.attributes.height,a=a.attributes.poster;"undefined"!=typeof e&&(c=d.attributes.style=c+"width:"+CKEDITOR.tools.cssLength(e)+";");"undefined"!=typeof f&&(c=d.attributes.style=c+"height:"+CKEDITOR.tools.cssLength(f)+";");a&&(d.attributes.style=c+"background-image:url("+a+");");return d}}}})}});var e={toolbar:"Audio",dialogTitle:"Audio properties",fakeObject:"Audio",properties:"Edit audio",widthRequired:"Width field cannot be empty",heightRequired:"Height field cannot be empty",
-poster:"Poster image",sourceaudio:"Source audio",sourceType:"Audio type",linkTemplate:'<a href="%src%">%type%</a> ',fallbackTemplate:"Your browser doesn't support audio.<br>Please download the file: %links%"},f={toolbar:"Audio",dialogTitle:"Propiedades de audio",fakeObject:"Audio",properties:"Editar el audio",widthRequired:"La anchura no se puede dejar en blanco",heightRequired:"La altura no se puede dejar en blanco",poster:"Imagen de presentaciĆ³n",sourceaudio:"Archivo de audio",sourceType:"Tipo",
-linkTemplate:'<a href="%src%">%type%</a> ',fallbackTemplate:"Su navegador no soporta audio.<br>Por favor, descargue el fichero: %links%"};CKEDITOR.skins&&(e={audio:e},f={audio:f});CKEDITOR.plugins.setLang("audio","en",e);CKEDITOR.plugins.setLang("audio","es",f)})();CKEDITOR.plugins.add("html5video",{requires:"widget",lang:"de,en,eu,es,ru,uk,fr",icons:"html5video",init:function(b){b.widgets.add("html5video",{button:b.lang.html5video.button,template:'\x3cdiv class\x3d"ckeditor-html5-video"\x3e\x3c/div\x3e',allowedContent:"div[data-responsive](!ckeditor-html5-video){text-align,float,margin-left,margin-right}; video[src,controls,autoplay,width, height]{max-width,height};",requiredContent:"div(ckeditor-html5-video); video[src,controls];",upcast:function(a){return"div"===
+a.config.oembed_maxHeight:"315",label:a.lang.oembed.height,title:a.lang.oembed.heightTitle,setup:function(a){a.data.maxHeight&&this.setValue(a.data.maxHeight)}}]}]},{type:"hbox",id:"alignment",children:[{id:"align",type:"radio",items:[[a.lang.oembed.none,"none"],[a.lang.common.alignLeft,"left"],[a.lang.common.alignCenter,"center"],[a.lang.common.alignRight,"right"]],label:a.lang.common.align,setup:function(a){this.setValue(a.data.align)}}]}]}]}})}})})();CKEDITOR.plugins.add("html5video",{requires:"widget",lang:"de,en,eu,es,ru,uk,fr",icons:"html5video",init:function(b){b.widgets.add("html5video",{button:b.lang.html5video.button,template:'\x3cdiv class\x3d"ckeditor-html5-video"\x3e\x3c/div\x3e',allowedContent:"div[data-responsive](!ckeditor-html5-video){text-align,float,margin-left,margin-right}; video[src,controls,autoplay,width, height]{max-width,height};",requiredContent:"div(ckeditor-html5-video); video[src,controls];",upcast:function(a){return"div"===
 a.name&&a.hasClass("ckeditor-html5-video")},dialog:"html5video",init:function(){var a="",b="",e=this.element.getStyle("text-align"),c="",d="";this.element.getChild(0)&&(a=this.element.getChild(0).getAttribute("src"),c=this.element.getChild(0).getAttribute("width"),d=this.element.getChild(0).getAttribute("height"),b=this.element.getChild(0).getAttribute("autoplay"),responsive=this.element.getAttribute("data-responsive"));a&&(this.setData("src",a),e?this.setData("align",e):this.setData("align","none"),
 c&&this.setData("width",c),d&&this.setData("height",d),b&&this.setData("autoplay","yes"),responsive&&this.setData("responsive",responsive))},data:function(){if(this.data.src){if(!this.element.getChild(0)){var a=new CKEDITOR.dom.element("video");a.setAttribute("controls","controls");this.element.append(a)}this.element.getChild(0).setAttribute("src",this.data.src);this.data.width&&this.element.getChild(0).setAttribute("width",this.data.width);this.data.height&&this.element.getChild(0).setAttribute("height",
 this.data.height);this.data.responsive?(this.element.setAttribute("data-responsive",this.data.responsive),this.element.getChild(0).setStyle("max-width","100%"),this.element.getChild(0).setStyle("height","auto")):(this.element.getChild(0).removeStyle("max-width"),this.element.getChild(0).removeStyle("height"))}this.element.removeStyle("float");this.element.removeStyle("margin-left");this.element.removeStyle("margin-right");"none"===this.data.align?this.element.removeStyle("text-align"):this.element.setStyle("text-align",
 this.data.align);"left"===this.data.align?(this.element.setStyle("float",this.data.align),this.element.setStyle("margin-right","10px")):"right"===this.data.align&&(this.element.setStyle("float",this.data.align),this.element.setStyle("margin-left","10px"));this.element.getChild(0)&&("yes"===this.data.autoplay?this.element.getChild(0).setAttribute("autoplay","autoplay"):this.element.getChild(0).removeAttribute("autoplay"))}});b.contextMenu&&(b.addMenuGroup("html5videoGroup"),b.addMenuItem("html5videoPropertiesItem",
-{label:b.lang.html5video.videoProperties,icon:"html5video",command:"html5video",group:"html5videoGroup"}),b.contextMenu.addListener(function(a){if(a&&a.getChild(0)&&a.getChild(0).hasClass&&a.getChild(0).hasClass("ckeditor-html5-video"))return{html5videoPropertiesItem:CKEDITOR.TRISTATE_OFF}}));CKEDITOR.dialog.add("html5video",this.path+"dialogs/html5video.js")}});CKEDITOR.config.plugins='dialogui,dialog,a11yhelp,dialogadvtab,basicstyles,panel,floatpanel,menu,contextmenu,resize,button,toolbar,elementspath,enterkey,entities,popup,filebrowser,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,fakeobjects,iframe,wysiwygarea,image,indent,indentblock,indentlist,justify,link,list,liststyle,magicline,maximize,removeformat,showborders,sourcearea,tab,lineutils,notification,clipboard,widgetselection,widget,oembed,Audio,html5video';CKEDITOR.config.skin='moono';(function() {var setIcons = function(icons, strip) {var path = CKEDITOR.getUrl( 'plugins/' + strip );icons = icons.split( ',' );for ( var i = 0; i < icons.length; i++ )CKEDITOR.skin.icons[ icons[ i ] ] = { path: path, offset: -icons[ ++i ], bgsize : icons[ ++i ] };};if (CKEDITOR.env.hidpi) setIcons('bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,horizontalrule,144,,iframe,168,,image,192,,indent-rtl,216,,indent,240,,outdent-rtl,264,,outdent,288,,justifyblock,312,,justifycenter,336,,justifyleft,360,,justifyright,384,,anchor-rtl,408,,anchor,432,,link,456,,unlink,480,,bulletedlist-rtl,504,,bulletedlist,528,,numberedlist-rtl,552,,numberedlist,576,,maximize,600,,removeformat,624,,source-rtl,648,,source,672,,copy-rtl,696,,copy,720,,cut-rtl,744,,cut,768,,paste-rtl,792,,paste,816,,oembed,840,,html5video,1728,auto','icons_hidpi.png');else setIcons('bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,horizontalrule,144,auto,iframe,168,auto,image,192,auto,indent-rtl,216,auto,indent,240,auto,outdent-rtl,264,auto,outdent,288,auto,justifyblock,312,auto,justifycenter,336,auto,justifyleft,360,auto,justifyright,384,auto,anchor-rtl,408,auto,anchor,432,auto,link,456,auto,unlink,480,auto,bulletedlist-rtl,504,auto,bulletedlist,528,auto,numberedlist-rtl,552,auto,numberedlist,576,auto,maximize,600,auto,removeformat,624,auto,source-rtl,648,auto,source,672,auto,copy-rtl,696,auto,copy,720,auto,cut-rtl,744,auto,cut,768,auto,paste-rtl,792,auto,paste,816,auto,oembed,840,auto,html5video,864,auto','icons.png');})();CKEDITOR.lang.languages={"en":1,"fr":1};}());
\ No newline at end of file
+{label:b.lang.html5video.videoProperties,icon:"html5video",command:"html5video",group:"html5videoGroup"}),b.contextMenu.addListener(function(a){if(a&&a.getChild(0)&&a.getChild(0).hasClass&&a.getChild(0).hasClass("ckeditor-html5-video"))return{html5videoPropertiesItem:CKEDITOR.TRISTATE_OFF}}));CKEDITOR.dialog.add("html5video",this.path+"dialogs/html5video.js")}});CKEDITOR.plugins.add("html5audio",{requires:"widget",lang:"de,el,en,eu,es,fr,ru,uk,uz,zh-cn",icons:"html5audio",init:function(b){b.widgets.add("html5audio",{button:b.lang.html5audio.button,template:'\x3cdiv class\x3d"ckeditor-html5-audio"\x3e\x3c/div\x3e',editables:{},allowedContent:"div(!ckeditor-html5-audio){text-align,float,margin-left,margin-right}; audio[src,controls,controlslist,autoplay];",requiredContent:"div(ckeditor-html5-audio); audio[src,controls];",upcast:function(a){return"div"===a.name&&
+a.hasClass("ckeditor-html5-audio")},dialog:"html5audio",init:function(){var a="",b="",c=this.element.getStyle("text-align");this.element.getChild(0)&&(a=this.element.getChild(0).getAttribute("src"),b=this.element.getChild(0).getAttribute("autoplay"),allowdownload=!this.element.getChild(0).getAttribute("controlslist"));a&&(this.setData("src",a),c?this.setData("align",c):this.setData("align","none"),b&&this.setData("autoplay","yes"),allowdownload&&this.setData("allowdownload","yes"))},data:function(){if(this.data.src){if(!this.element.getChild(0)){var a=
+new CKEDITOR.dom.element("audio");a.setAttribute("controls","controls");this.element.append(a)}this.element.getChild(0).setAttribute("src",this.data.src)}this.element.removeStyle("float");this.element.removeStyle("margin-left");this.element.removeStyle("margin-right");"none"===this.data.align?this.element.removeStyle("text-align"):this.element.setStyle("text-align",this.data.align);"left"===this.data.align?(this.element.setStyle("float",this.data.align),this.element.setStyle("margin-right","10px")):
+"right"===this.data.align&&(this.element.setStyle("float",this.data.align),this.element.setStyle("margin-left","10px"));this.element.getChild(0)&&("yes"===this.data.autoplay?this.element.getChild(0).setAttribute("autoplay","autoplay"):this.element.getChild(0).removeAttribute("autoplay"),"yes"===this.data.allowdownload?this.element.getChild(0).removeAttribute("controlslist"):this.element.getChild(0).setAttribute("controlslist","nodownload"))}});b.contextMenu&&(b.addMenuGroup("html5audioGroup"),b.addMenuItem("html5audioPropertiesItem",
+{label:b.lang.html5audio.audioProperties,icon:"html5audio",command:"html5audio",group:"html5audioGroup"}),b.contextMenu.addListener(function(a){if(a&&a.getChild(0)&&a.getChild(0).hasClass&&a.getChild(0).hasClass("ckeditor-html5-audio"))return{html5audioPropertiesItem:CKEDITOR.TRISTATE_OFF}}));CKEDITOR.dialog.add("html5audio",this.path+"dialogs/html5audio.js")}});CKEDITOR.config.plugins='dialogui,dialog,a11yhelp,dialogadvtab,basicstyles,panel,floatpanel,menu,contextmenu,resize,button,toolbar,elementspath,enterkey,entities,popup,filebrowser,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,fakeobjects,iframe,wysiwygarea,image,indent,indentblock,indentlist,justify,link,list,liststyle,magicline,maximize,removeformat,showborders,sourcearea,tab,lineutils,notification,clipboard,widgetselection,widget,oembed,html5video,html5audio';CKEDITOR.config.skin='moono';(function() {var setIcons = function(icons, strip) {var path = CKEDITOR.getUrl( 'plugins/' + strip );icons = icons.split( ',' );for ( var i = 0; i < icons.length; i++ )CKEDITOR.skin.icons[ icons[ i ] ] = { path: path, offset: -icons[ ++i ], bgsize : icons[ ++i ] };};if (CKEDITOR.env.hidpi) setIcons('bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,horizontalrule,144,,iframe,168,,image,192,,indent-rtl,216,,indent,240,,outdent-rtl,264,,outdent,288,,justifyblock,312,,justifycenter,336,,justifyleft,360,,justifyright,384,,anchor-rtl,408,,anchor,432,,link,456,,unlink,480,,bulletedlist-rtl,504,,bulletedlist,528,,numberedlist-rtl,552,,numberedlist,576,,maximize,600,,removeformat,624,,source-rtl,648,,source,672,,copy-rtl,696,,copy,720,,cut-rtl,744,,cut,768,,paste-rtl,792,,paste,816,,oembed,840,,html5video,1728,auto,html5audio,1776,auto','icons_hidpi.png');else setIcons('bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,horizontalrule,144,auto,iframe,168,auto,image,192,auto,indent-rtl,216,auto,indent,240,auto,outdent-rtl,264,auto,outdent,288,auto,justifyblock,312,auto,justifycenter,336,auto,justifyleft,360,auto,justifyright,384,auto,anchor-rtl,408,auto,anchor,432,auto,link,456,auto,unlink,480,auto,bulletedlist-rtl,504,auto,bulletedlist,528,auto,numberedlist-rtl,552,auto,numberedlist,576,auto,maximize,600,auto,removeformat,624,auto,source-rtl,648,auto,source,672,auto,copy-rtl,696,auto,copy,720,auto,cut-rtl,744,auto,cut,768,auto,paste-rtl,792,auto,paste,816,auto,oembed,840,auto,html5video,864,auto,html5audio,888,auto','icons.png');})();CKEDITOR.lang.languages={"en":1,"fr":1};}());
\ No newline at end of file