aboutsummaryrefslogtreecommitdiff
path: root/release/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'release/plugins')
-rw-r--r--release/plugins/Audio/dialogs/audio.js9
-rw-r--r--release/plugins/Audio/docs/install.html69
-rw-r--r--release/plugins/Audio/docs/styles.css67
-rw-r--r--release/plugins/Audio/images/audio.pngbin15258 -> 0 bytes
-rw-r--r--release/plugins/Audio/images/icon.pngbin1356 -> 0 bytes
-rw-r--r--release/plugins/Audio/images/placeholder.pngbin862 -> 0 bytes
-rw-r--r--release/plugins/html5audio/dialogs/html5audio.js4
-rw-r--r--release/plugins/icons.pngbin4993 -> 5377 bytes
-rw-r--r--release/plugins/icons_hidpi.pngbin14581 -> 15009 bytes
9 files changed, 4 insertions, 145 deletions
diff --git a/release/plugins/Audio/dialogs/audio.js b/release/plugins/Audio/dialogs/audio.js
deleted file mode 100644
index da9495c..0000000
--- a/release/plugins/Audio/dialogs/audio.js
+++ /dev/null
@@ -1,9 +0,0 @@
1CKEDITOR.dialog.add("audio",function(d){function g(a,c){var b=this.getValue();!b&&"id"==this.id&&(b=m());a.setAttribute(this.id,b);if(b)switch(this.id){case "poster":c.backgroundImage="url("+b+")";break;case "width":c.width=b+"px";break;case "height":c.height=b+"px"}}function i(a,c,b){c=this.id.match(/(\w+)(\d)/);a=c[1];c=parseInt(c[2],10);(b[c]||(b[c]={}))[a]=this.getValue()}function j(a){a?this.setValue(a.getAttribute(this.id)):"id"==this.id&&this.setValue(m())}function h(a,c){var b=this.id.match(/(\w+)(\d)/),
2d=b[1],b=parseInt(b[2],10);(b=c[b])&&this.setValue(b[d])}function m(){var a=new Date;return"audio"+a.getFullYear()+a.getMonth()+a.getDate()+a.getHours()+a.getMinutes()+a.getSeconds()}var e=d.lang.audio,l=function(){var a=this.previewImage;a.removeListener("load",l);a.removeListener("error",f);a.removeListener("abort",f);this.setValueOf("info","width",a.$.width);this.setValueOf("info","height",a.$.height)},f=function(){var a=this.previewImage;a.removeListener("load",l);a.removeListener("error",f);
3a.removeListener("abort",f)};return{title:e.dialogTitle,minWidth:400,minHeight:200,onShow:function(){this.fakeImage=this.audioNode=null;this.previewImage=d.document.createElement("img");var a=this.getSelectedElement();if(a&&a.data("cke-real-element-type")&&"audio"==a.data("cke-real-element-type")){this.fakeImage=a;var a=d.restoreRealElement(a),c=[],b=a.getElementsByTag("source","");0==b.count()&&(b=a.getElementsByTag("source","cke"));for(var e=0,f=b.count();e<f;e++){var g=b.getItem(e);c.push({src:g.getAttribute("src"),
4type:g.getAttribute("type")})}this.audioNode=a;this.setupContent(a,c)}else this.setupContent(null,[])},onOk:function(){var a=null;this.fakeImage?a=this.audioNode:(a=CKEDITOR.dom.element.createFromHtml("<cke:audio></cke:audio>",d.document),a.setAttributes({controls:"controls"}));var c={},b=[];this.commitContent(a,c,b);for(var f="",g="",i=e.linkTemplate||"",j=e.fallbackTemplate||"",h=0;h<b.length;h++){var k=b[h];k&&k.src&&(f+='<cke:source src="'+k.src+'" type="'+k.type+'" />',g+=i.replace("%src%",k.src).replace("%type%",
5k.type))}a.setHtml(f+j.replace("%links%",g));a=d.createFakeElement(a,"cke_audio","audio",!1);a.setStyles(c);this.fakeImage?(a.replace(this.fakeImage),d.getSelection().selectElement(a)):(c=new CKEDITOR.dom.element("DIV",d.document),d.insertElement(c),c.append(a))},onHide:function(){this.previewImage&&(this.previewImage.removeListener("load",l),this.previewImage.removeListener("error",f),this.previewImage.removeListener("abort",f),this.previewImage.remove(),this.previewImage=null)},contents:[{id:"info",
6elements:[{type:"hbox",widths:["","100px"],children:[{type:"text",id:"poster",label:e.poster,commit:g,setup:j,onChange:function(){var a=this.getDialog(),c=this.getValue();if(0<c.length){var a=this.getDialog(),b=a.previewImage;b.on("load",l,a);b.on("error",f,a);b.on("abort",f,a);b.setAttribute("src",c)}}},{type:"button",id:"browse",hidden:"true",style:"display:inline-block;margin-top:10px;",filebrowser:{action:"Browse",target:"info:poster",url:d.config.filebrowserImageBrowseUrl||d.config.filebrowserBrowseUrl},
7label:d.lang.common.browseServer}]},{type:"hbox",widths:["33%","33%","33%"],children:[{type:"text",id:"width",label:d.lang.common.width,"default":400,validate:CKEDITOR.dialog.validate.notEmpty(e.widthRequired),commit:g,setup:j},{type:"text",id:"height",label:d.lang.common.height,"default":300,validate:CKEDITOR.dialog.validate.notEmpty(e.heightRequired),commit:g,setup:j},{type:"text",id:"id",label:"Id",commit:g,setup:j}]},{type:"hbox",widths:["","100px","75px"],children:[{type:"text",id:"src0",label:e.sourceaudio,
8commit:i,setup:h},{type:"button",id:"browse",hidden:"true",style:"display:inline-block;margin-top:10px;",filebrowser:{action:"Browse",target:"info:src0",url:d.config.filebrowserAudioBrowseUrl||d.config.filebrowserBrowseUrl},label:d.lang.common.browseServer},{id:"type0",label:e.sourceType,type:"select","default":"audio/mp3",items:[["MP3","audio/mp3"],["WAV","audio/wav"]],commit:i,setup:h}]},{type:"hbox",widths:["","100px","75px"],children:[{type:"text",id:"src1",label:e.sourceaudio,commit:i,setup:h},
9{type:"button",id:"browse",hidden:"true",style:"display:inline-block;margin-top:10px;",filebrowser:{action:"Browse",target:"info:src1",url:d.config.filebrowserAudioBrowseUrl||d.config.filebrowserBrowseUrl},label:d.lang.common.browseServer},{id:"type1",label:e.sourceType,type:"select","default":"audio/wav",items:[["MP3","audio/mp3"],["WAV","audio/wav"]],commit:i,setup:h}]}]}]}}); \ No newline at end of file
diff --git a/release/plugins/Audio/docs/install.html b/release/plugins/Audio/docs/install.html
deleted file mode 100644
index 3fbf30e..0000000
--- a/release/plugins/Audio/docs/install.html
+++ /dev/null
@@ -1,69 +0,0 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3<html lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6<title>Audio plugin</title>
7<link href="styles.css" rel="stylesheet" type="text/css">
8</head>
9
10<body>
11<h1>Audio Plugin for CKEditor</h1>
12
13<h2>Introduction</h2>
14<p>This is a plugin to create HTML5 &lt;audio&gt; elements in <a href="http://www.ckeditor.com">CKEditor</a>.</p>
15<h3>Version history: </h3>
16<ol>
17 <li>1.0: 10-July-2015. First version.</li>
18</ol>
19
20<h2>Installation</h2>
21<h3>1. Copying the files</h3>
22<p>Extract the contents of the zip in you plugins directory, so it ends up like
23 this<br>
24 <!--<img src="installation.png" alt="Screenshot of installation" width="311" height="346" longdesc="#install">-->
25 </p>
26<pre id="--install">
27ckeditor\
28 ...
29 images\
30 lang\
31 plugins\
32 ...
33 audio\
34 plugin.js
35 dialogs\
36 audio.js
37 docs\
38 install.html
39 images\
40 icon.png
41 placeholder.png
42 ...
43 skins\
44 themes\
45</pre>
46<h3>2. Adding it to CKEditor</h3>
47<p>Now add the plugin in your <em>config.js</em> or custom js configuration
48file:
49<code>config.extraPlugins='audio'; </code>
50</p>
51
52<h3>3. Add it to your toolbar</h3>
53<p>In your toolbar configuration, add a new 'Audio' item in the place where you want the button to show up.</p>
54
55<h3>4. Configure server browser for audio</h3>
56<p>You can use the <code>config.filebrowserAudioBrowseUrl</code> entry to specify a url so the file browser shows just audio elements (as long as your configure properly your file browser).</p>
57
58<h3>5. Use it</h3>
59<p>Now empty the cache of your browser and reload the editor, the new button should show up and you can add &lt;audio&gt; elements into the content.</p>
60
61<h2>Final notes</h2>
62<p>Please, note that only newer browsers support the Audio element, in older ones a simple text linking to the source audios is provided, you might want to
63use some javascript or css to customize the final behavior of these elements.</p>
64
65
66<h2>Disclaimers</h2>
67<p>CKEditor is &copy; CKSource.com</p>
68</body>
69</html>
diff --git a/release/plugins/Audio/docs/styles.css b/release/plugins/Audio/docs/styles.css
deleted file mode 100644
index 5eba91e..0000000
--- a/release/plugins/Audio/docs/styles.css
+++ /dev/null
@@ -1,67 +0,0 @@
1body {
2 font-family: Arial, Helvetica, sans-serif;
3 font-size: 90%;
4}
5h1 {
6 text-align:center;
7 font-size:180%;
8}
9h2 {
10 border-bottom:2px solid #CCC;
11 margin:1em 0 0.4em 0;
12}
13h3 {
14 margin-bottom:0.4em;
15}
16p {
17 margin:0 0 1em 1em;
18 text-align:justify;
19}
20ol {
21 margin:0 0 1.2em 1em;
22 padding:0;
23 list-style-type:none;
24}
25ol li {
26 margin:0.2em 0;
27}
28pre {
29 font-size:100%;
30 font-family:"Courier New", Courier, mono;
31 background-color: #CCCCCC;
32 border:1px solid #999;
33 padding:0.2em 1em;
34 margin: 0.4em 0;
35 display:block;
36 white-space: pre;
37 overflow: auto;
38}
39code {
40 font-size:100%;
41 font-family:"Courier New", Courier, mono;
42 background-color: #CCCCCC;
43 border:1px solid #999;
44 padding:0.2em;
45 white-space: pre;
46}
47form {
48 margin:0 0 0 1em;
49}
50span.key {
51 color: #006600;
52}
53#install {
54 display:none
55}
56#languages ul {
57 display:inline;
58 list-style-type:none;
59 margin:0;
60 padding:0;
61}
62#languages li {
63 display:inline;
64 margin:0;
65 padding:0;
66 vertical-align:bottom;
67}
diff --git a/release/plugins/Audio/images/audio.png b/release/plugins/Audio/images/audio.png
deleted file mode 100644
index b4a4ef7..0000000
--- a/release/plugins/Audio/images/audio.png
+++ /dev/null
Binary files differ
diff --git a/release/plugins/Audio/images/icon.png b/release/plugins/Audio/images/icon.png
deleted file mode 100644
index 1ec7ecc..0000000
--- a/release/plugins/Audio/images/icon.png
+++ /dev/null
Binary files differ
diff --git a/release/plugins/Audio/images/placeholder.png b/release/plugins/Audio/images/placeholder.png
deleted file mode 100644
index 1456cac..0000000
--- a/release/plugins/Audio/images/placeholder.png
+++ /dev/null
Binary files differ
diff --git a/release/plugins/html5audio/dialogs/html5audio.js b/release/plugins/html5audio/dialogs/html5audio.js
new file mode 100644
index 0000000..fb2efe0
--- /dev/null
+++ b/release/plugins/html5audio/dialogs/html5audio.js
@@ -0,0 +1,4 @@
1CKEDITOR.dialog.add("html5audio",function(a){return{title:a.lang.html5audio.title,minWidth:500,minHeight:100,contents:[{id:"info",label:a.lang.html5audio.infoLabel,elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["365px","110px"],align:"right",children:[{type:"text",id:"url",label:a.lang.common.url,required:!0,validate:CKEDITOR.dialog.validate.notEmpty(a.lang.html5audio.urlMissing),setup:function(a){this.setValue(a.data.src)},commit:function(a){a.setData("src",this.getValue())}},{type:"button",
2id:"browse",style:"display:inline-block;margin-top:14px;",align:"center",label:a.lang.common.browseServer,hidden:!0,filebrowser:"info:url"}]}]},{type:"hbox",id:"alignment",children:[{type:"radio",id:"align",label:a.lang.common.align,items:[[a.lang.common.alignCenter,"center"],[a.lang.common.alignLeft,"left"],[a.lang.common.alignRight,"right"],[a.lang.common.alignNone,"none"]],"default":"center",setup:function(a){a.data.align&&this.setValue(a.data.align)},commit:function(a){a.setData("align",this.getValue())}}]}]},
3{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:a.lang.html5audio.upload,elements:[{type:"file",id:"upload",label:a.lang.html5audio.btnUpload,style:"height:40px",size:38},{type:"fileButton",id:"uploadButton",filebrowser:"info:url",label:a.lang.html5audio.btnUpload,"for":["Upload","upload"]}]},{id:"advanced",label:a.lang.html5audio.advanced,elements:[{type:"vbox",padding:0,children:[{type:"hbox",children:[{type:"radio",id:"autoplay",label:a.lang.html5audio.autoplay,items:[[a.lang.html5audio.yes,
4"yes"],[a.lang.html5audio.no,"no"]],"default":"no",setup:function(a){a.data.autoplay&&this.setValue(a.data.autoplay)},commit:function(a){a.setData("autoplay",this.getValue())}},{type:"radio",id:"allowdownload",label:a.lang.html5audio.allowdownload,items:[[a.lang.html5audio.yes,"yes"],[a.lang.html5audio.no,"no"]],"default":"no",setup:function(a){a.data.allowdownload&&this.setValue(a.data.allowdownload)},commit:function(a){a.setData("allowdownload",this.getValue())}}]}]}]}]}}); \ No newline at end of file
diff --git a/release/plugins/icons.png b/release/plugins/icons.png
index ab7c411..43b7e45 100644
--- a/release/plugins/icons.png
+++ b/release/plugins/icons.png
Binary files differ
diff --git a/release/plugins/icons_hidpi.png b/release/plugins/icons_hidpi.png
index 2516678..5b237a8 100644
--- a/release/plugins/icons_hidpi.png
+++ b/release/plugins/icons_hidpi.png
Binary files differ