CKEDITOR.plugins.add( 'html5audio', {\r
requires: 'widget',\r
- lang: 'de,en,eu,es,fr,ru,uk,uz',\r
+ lang: 'de,el,en,eu,es,fr,ru,uk,uz,zh-cn',\r
icons: 'html5audio',\r
init: function( editor ) {\r
editor.widgets.add( 'html5audio', {\r
* - div-s with text-align,float,margin-left,margin-right inline style rules and required ckeditor-html5-audio class.\r
* - audio tags with src and controls attributes.\r
*/\r
- allowedContent: 'div(!ckeditor-html5-audio){text-align,float,margin-left,margin-right}; audio[src,controls,autoplay];',\r
+ allowedContent: 'div(!ckeditor-html5-audio){text-align,float,margin-left,margin-right}; audio[src,controls,controlslist,autoplay];',\r
requiredContent: 'div(ckeditor-html5-audio); audio[src,controls];',\r
upcast: function( element ) {\r
return element.name === 'div' && element.hasClass( 'ckeditor-html5-audio' );\r
// get it's attributes.\r
src = this.element.getChild( 0 ).getAttribute( 'src' );\r
autoplay = this.element.getChild( 0 ).getAttribute( 'autoplay' );\r
+ allowdownload = !this.element.getChild( 0 ).getAttribute( 'controlslist' );\r
}\r
\r
if ( src ) {\r
if ( autoplay ) {\r
this.setData( 'autoplay', 'yes' );\r
}\r
+\r
+ if ( allowdownload ) {\r
+ this.setData( 'allowdownload', 'yes' );\r
+ }\r
}\r
},\r
data: function() {\r
} else {\r
this.element.getChild( 0 ).removeAttribute( 'autoplay' );\r
}\r
+ if ( this.data.allowdownload === 'yes' ) {\r
+ this.element.getChild( 0 ).removeAttribute( 'controlslist' );\r
+ } else {\r
+ this.element.getChild( 0 ).setAttribute( 'controlslist', 'nodownload' );\r
+ }\r
}\r
}\r
} );\r