diff options
Diffstat (limited to 'plugins/sourcedialog')
68 files changed, 789 insertions, 0 deletions
diff --git a/plugins/sourcedialog/dialogs/sourcedialog.js b/plugins/sourcedialog/dialogs/sourcedialog.js new file mode 100644 index 0000000..81aa7c8 --- /dev/null +++ b/plugins/sourcedialog/dialogs/sourcedialog.js @@ -0,0 +1,78 @@ +/**
+ * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.html or http://ckeditor.com/license
+ */
+
+CKEDITOR.dialog.add( 'sourcedialog', function( editor ) {
+ var size = CKEDITOR.document.getWindow().getViewPaneSize();
+
+ // Make it maximum 800px wide, but still fully visible in the viewport.
+ var width = Math.min( size.width - 70, 800);
+
+ // Make it use 2/3 of the viewport height.
+ var height = size.height / 1.5;
+
+ // Store old editor data to avoid unnecessary setData.
+ var oldData;
+
+ return {
+ title: editor.lang.sourcedialog.title,
+ minWidth: 100,
+ minHeight: 100,
+
+ onShow: function() {
+ this.setValueOf( 'main', 'data', oldData = editor.getData() );
+ },
+
+ onOk: (function() {
+ function setData( newData ) {
+ var that = this;
+
+ editor.setData( newData, function() {
+ that.hide();
+
+ // Ensure correct selection.
+ var range = editor.createRange();
+ range.moveToElementEditStart( editor.editable() );
+ range.select();
+ } );
+ }
+
+ return function( event ) {
+ // Remove CR from input data for reliable comparison with editor data.
+ var newData = this.getValueOf( 'main', 'data' ).replace( /\r/g, '' );
+
+ // Avoid unnecessary setData. Also preserve selection
+ // when user changed his mind and goes back to wysiwyg editing.
+ if ( newData === oldData )
+ return true;
+
+ // Set data asynchronously to avoid errors in IE.
+ CKEDITOR.env.ie ?
+ CKEDITOR.tools.setTimeout( setData, 0, this, newData )
+ :
+ setData.call( this, newData );
+
+ // Don't let the dialog close before setData is over.
+ return false;
+ };
+ })(),
+
+ contents: [{
+ id: 'main',
+ label: editor.lang.sourcedialog.title,
+ elements: [{
+ type: 'textarea',
+ type: 'textarea',
+ id: 'data',
+ dir: 'ltr',
+ inputStyle: 'cursor:auto;' +
+ 'width:' + width + 'px;' +
+ 'height:' + height + 'px;' +
+ 'tab-size:4;' +
+ 'text-align:left;',
+ 'class': 'cke_source'
+ }]
+ }]
+ };
+});
diff --git a/plugins/sourcedialog/icons/sourcedialog-rtl.png b/plugins/sourcedialog/icons/sourcedialog-rtl.png Binary files differnew file mode 100644 index 0000000..2efa25d --- /dev/null +++ b/plugins/sourcedialog/icons/sourcedialog-rtl.png diff --git a/plugins/sourcedialog/icons/sourcedialog.png b/plugins/sourcedialog/icons/sourcedialog.png Binary files differnew file mode 100644 index 0000000..ffd830d --- /dev/null +++ b/plugins/sourcedialog/icons/sourcedialog.png diff --git a/plugins/sourcedialog/lang/af.js b/plugins/sourcedialog/lang/af.js new file mode 100644 index 0000000..3eea46b --- /dev/null +++ b/plugins/sourcedialog/lang/af.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'af', {
+ toolbar: 'Bron',
+ title: 'Bron'
+});
diff --git a/plugins/sourcedialog/lang/ar.js b/plugins/sourcedialog/lang/ar.js new file mode 100644 index 0000000..d77249e --- /dev/null +++ b/plugins/sourcedialog/lang/ar.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ar', {
+ toolbar: 'المصدر',
+ title: 'المصدر'
+});
diff --git a/plugins/sourcedialog/lang/bg.js b/plugins/sourcedialog/lang/bg.js new file mode 100644 index 0000000..88d58f7 --- /dev/null +++ b/plugins/sourcedialog/lang/bg.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'bg', {
+ toolbar: 'Източник',
+ title: 'Източник'
+});
diff --git a/plugins/sourcedialog/lang/bn.js b/plugins/sourcedialog/lang/bn.js new file mode 100644 index 0000000..165ac15 --- /dev/null +++ b/plugins/sourcedialog/lang/bn.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'bn', {
+ toolbar: 'সোর্স',
+ title: 'সোর্স'
+});
diff --git a/plugins/sourcedialog/lang/bs.js b/plugins/sourcedialog/lang/bs.js new file mode 100644 index 0000000..cc68590 --- /dev/null +++ b/plugins/sourcedialog/lang/bs.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'bs', {
+ toolbar: 'HTML kôd',
+ title: 'HTML kôd'
+});
diff --git a/plugins/sourcedialog/lang/ca.js b/plugins/sourcedialog/lang/ca.js new file mode 100644 index 0000000..a32e573 --- /dev/null +++ b/plugins/sourcedialog/lang/ca.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ca', {
+ toolbar: 'Codi font',
+ title: 'Codi font'
+});
diff --git a/plugins/sourcedialog/lang/cs.js b/plugins/sourcedialog/lang/cs.js new file mode 100644 index 0000000..76e2308 --- /dev/null +++ b/plugins/sourcedialog/lang/cs.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'cs', {
+ toolbar: 'Zdroj',
+ title: 'Zdroj'
+});
diff --git a/plugins/sourcedialog/lang/cy.js b/plugins/sourcedialog/lang/cy.js new file mode 100644 index 0000000..dd7b5e7 --- /dev/null +++ b/plugins/sourcedialog/lang/cy.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'cy', {
+ toolbar: 'HTML',
+ title: 'HTML'
+});
diff --git a/plugins/sourcedialog/lang/da.js b/plugins/sourcedialog/lang/da.js new file mode 100644 index 0000000..1a790fb --- /dev/null +++ b/plugins/sourcedialog/lang/da.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'da', {
+ toolbar: 'Kilde',
+ title: 'Kilde'
+});
diff --git a/plugins/sourcedialog/lang/de.js b/plugins/sourcedialog/lang/de.js new file mode 100644 index 0000000..980bba7 --- /dev/null +++ b/plugins/sourcedialog/lang/de.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'de', {
+ toolbar: 'Quellcode',
+ title: 'Quellcode'
+});
diff --git a/plugins/sourcedialog/lang/el.js b/plugins/sourcedialog/lang/el.js new file mode 100644 index 0000000..aa6a8fe --- /dev/null +++ b/plugins/sourcedialog/lang/el.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'el', {
+ toolbar: 'HTML κώδικας',
+ title: 'HTML κώδικας'
+});
diff --git a/plugins/sourcedialog/lang/en-au.js b/plugins/sourcedialog/lang/en-au.js new file mode 100644 index 0000000..de859a8 --- /dev/null +++ b/plugins/sourcedialog/lang/en-au.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'en-au', {
+ toolbar: 'Source',
+ title: 'Source'
+});
diff --git a/plugins/sourcedialog/lang/en-ca.js b/plugins/sourcedialog/lang/en-ca.js new file mode 100644 index 0000000..f30c154 --- /dev/null +++ b/plugins/sourcedialog/lang/en-ca.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'en-ca', {
+ toolbar: 'Source',
+ title: 'Source'
+});
diff --git a/plugins/sourcedialog/lang/en-gb.js b/plugins/sourcedialog/lang/en-gb.js new file mode 100644 index 0000000..aedbd64 --- /dev/null +++ b/plugins/sourcedialog/lang/en-gb.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'en-gb', {
+ toolbar: 'Source',
+ title: 'Source'
+});
diff --git a/plugins/sourcedialog/lang/en.js b/plugins/sourcedialog/lang/en.js new file mode 100644 index 0000000..aaa9efc --- /dev/null +++ b/plugins/sourcedialog/lang/en.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'en', {
+ toolbar: 'Source',
+ title: 'Source'
+});
diff --git a/plugins/sourcedialog/lang/eo.js b/plugins/sourcedialog/lang/eo.js new file mode 100644 index 0000000..427b12d --- /dev/null +++ b/plugins/sourcedialog/lang/eo.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'eo', {
+ toolbar: 'Fonto',
+ title: 'Fonto'
+});
diff --git a/plugins/sourcedialog/lang/es.js b/plugins/sourcedialog/lang/es.js new file mode 100644 index 0000000..02cb04c --- /dev/null +++ b/plugins/sourcedialog/lang/es.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'es', {
+ toolbar: 'Fuente HTML',
+ title: 'Fuente HTML'
+});
diff --git a/plugins/sourcedialog/lang/et.js b/plugins/sourcedialog/lang/et.js new file mode 100644 index 0000000..d37f3f0 --- /dev/null +++ b/plugins/sourcedialog/lang/et.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'et', {
+ toolbar: 'Lähtekood',
+ title: 'Lähtekood'
+});
diff --git a/plugins/sourcedialog/lang/eu.js b/plugins/sourcedialog/lang/eu.js new file mode 100644 index 0000000..5aac359 --- /dev/null +++ b/plugins/sourcedialog/lang/eu.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'eu', {
+ toolbar: 'HTML Iturburua',
+ title: 'HTML Iturburua'
+});
diff --git a/plugins/sourcedialog/lang/fa.js b/plugins/sourcedialog/lang/fa.js new file mode 100644 index 0000000..267e341 --- /dev/null +++ b/plugins/sourcedialog/lang/fa.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'fa', {
+ toolbar: 'منبع',
+ title: 'منبع'
+});
diff --git a/plugins/sourcedialog/lang/fi.js b/plugins/sourcedialog/lang/fi.js new file mode 100644 index 0000000..ee1789d --- /dev/null +++ b/plugins/sourcedialog/lang/fi.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'fi', {
+ toolbar: 'Koodi',
+ title: 'Koodi'
+});
diff --git a/plugins/sourcedialog/lang/fo.js b/plugins/sourcedialog/lang/fo.js new file mode 100644 index 0000000..220525c --- /dev/null +++ b/plugins/sourcedialog/lang/fo.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'fo', {
+ toolbar: 'Kelda',
+ title: 'Kelda'
+});
diff --git a/plugins/sourcedialog/lang/fr-ca.js b/plugins/sourcedialog/lang/fr-ca.js new file mode 100644 index 0000000..8d3f9ee --- /dev/null +++ b/plugins/sourcedialog/lang/fr-ca.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'fr-ca', {
+ toolbar: 'Source',
+ title: 'Source'
+});
diff --git a/plugins/sourcedialog/lang/fr.js b/plugins/sourcedialog/lang/fr.js new file mode 100644 index 0000000..807ae22 --- /dev/null +++ b/plugins/sourcedialog/lang/fr.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'fr', {
+ toolbar: 'Source',
+ title: 'Source'
+});
diff --git a/plugins/sourcedialog/lang/gl.js b/plugins/sourcedialog/lang/gl.js new file mode 100644 index 0000000..d12a7dd --- /dev/null +++ b/plugins/sourcedialog/lang/gl.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'gl', {
+ toolbar: 'Orixe',
+ title: 'Orixe'
+});
diff --git a/plugins/sourcedialog/lang/gu.js b/plugins/sourcedialog/lang/gu.js new file mode 100644 index 0000000..90eb676 --- /dev/null +++ b/plugins/sourcedialog/lang/gu.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'gu', {
+ toolbar: 'મૂળ કે પ્રાથમિક દસ્તાવેજ',
+ title: 'મૂળ કે પ્રાથમિક દસ્તાવેજ'
+});
diff --git a/plugins/sourcedialog/lang/he.js b/plugins/sourcedialog/lang/he.js new file mode 100644 index 0000000..317392c --- /dev/null +++ b/plugins/sourcedialog/lang/he.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'he', {
+ toolbar: 'מקור',
+ title: 'מקור'
+});
diff --git a/plugins/sourcedialog/lang/hi.js b/plugins/sourcedialog/lang/hi.js new file mode 100644 index 0000000..085d84a --- /dev/null +++ b/plugins/sourcedialog/lang/hi.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'hi', {
+ toolbar: 'सोर्स',
+ title: 'सोर्स'
+});
diff --git a/plugins/sourcedialog/lang/hr.js b/plugins/sourcedialog/lang/hr.js new file mode 100644 index 0000000..eaa748c --- /dev/null +++ b/plugins/sourcedialog/lang/hr.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'hr', {
+ toolbar: 'Kôd',
+ title: 'Kôd'
+});
diff --git a/plugins/sourcedialog/lang/hu.js b/plugins/sourcedialog/lang/hu.js new file mode 100644 index 0000000..5bf28f8 --- /dev/null +++ b/plugins/sourcedialog/lang/hu.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'hu', {
+ toolbar: 'Forráskód',
+ title: 'Forráskód'
+});
diff --git a/plugins/sourcedialog/lang/is.js b/plugins/sourcedialog/lang/is.js new file mode 100644 index 0000000..54a7361 --- /dev/null +++ b/plugins/sourcedialog/lang/is.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'is', {
+ toolbar: 'Kóði',
+ title: 'Kóði'
+});
diff --git a/plugins/sourcedialog/lang/it.js b/plugins/sourcedialog/lang/it.js new file mode 100644 index 0000000..093c440 --- /dev/null +++ b/plugins/sourcedialog/lang/it.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'it', {
+ toolbar: 'Sorgente',
+ title: 'Sorgente'
+});
diff --git a/plugins/sourcedialog/lang/ja.js b/plugins/sourcedialog/lang/ja.js new file mode 100644 index 0000000..f5aae80 --- /dev/null +++ b/plugins/sourcedialog/lang/ja.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ja', {
+ toolbar: 'ソース',
+ title: 'ソース'
+});
diff --git a/plugins/sourcedialog/lang/ka.js b/plugins/sourcedialog/lang/ka.js new file mode 100644 index 0000000..3a2911e --- /dev/null +++ b/plugins/sourcedialog/lang/ka.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ka', {
+ toolbar: 'კოდები',
+ title: 'კოდები'
+});
diff --git a/plugins/sourcedialog/lang/km.js b/plugins/sourcedialog/lang/km.js new file mode 100644 index 0000000..9f3562d --- /dev/null +++ b/plugins/sourcedialog/lang/km.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'km', {
+ toolbar: 'អក្សរកូដ',
+ title: 'អក្សរកូដ'
+});
diff --git a/plugins/sourcedialog/lang/ko.js b/plugins/sourcedialog/lang/ko.js new file mode 100644 index 0000000..897eb16 --- /dev/null +++ b/plugins/sourcedialog/lang/ko.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ko', {
+ toolbar: '소스',
+ title: '소스'
+});
diff --git a/plugins/sourcedialog/lang/ku.js b/plugins/sourcedialog/lang/ku.js new file mode 100644 index 0000000..710c4bb --- /dev/null +++ b/plugins/sourcedialog/lang/ku.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ku', {
+ toolbar: 'سەرچاوە',
+ title: 'سەرچاوە'
+});
diff --git a/plugins/sourcedialog/lang/lt.js b/plugins/sourcedialog/lang/lt.js new file mode 100644 index 0000000..2f81935 --- /dev/null +++ b/plugins/sourcedialog/lang/lt.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'lt', {
+ toolbar: 'Šaltinis',
+ title: 'Šaltinis'
+});
diff --git a/plugins/sourcedialog/lang/lv.js b/plugins/sourcedialog/lang/lv.js new file mode 100644 index 0000000..a474d06 --- /dev/null +++ b/plugins/sourcedialog/lang/lv.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'lv', {
+ toolbar: 'HTML kods',
+ title: 'HTML kods'
+});
diff --git a/plugins/sourcedialog/lang/mn.js b/plugins/sourcedialog/lang/mn.js new file mode 100644 index 0000000..17d118c --- /dev/null +++ b/plugins/sourcedialog/lang/mn.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'mn', {
+ toolbar: 'Код',
+ title: 'Код'
+});
diff --git a/plugins/sourcedialog/lang/ms.js b/plugins/sourcedialog/lang/ms.js new file mode 100644 index 0000000..33d60de --- /dev/null +++ b/plugins/sourcedialog/lang/ms.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ms', {
+ toolbar: 'Sumber',
+ title: 'Sumber'
+});
diff --git a/plugins/sourcedialog/lang/nb.js b/plugins/sourcedialog/lang/nb.js new file mode 100644 index 0000000..c2667af --- /dev/null +++ b/plugins/sourcedialog/lang/nb.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'nb', {
+ toolbar: 'Kilde',
+ title: 'Kilde'
+});
diff --git a/plugins/sourcedialog/lang/nl.js b/plugins/sourcedialog/lang/nl.js new file mode 100644 index 0000000..34a2573 --- /dev/null +++ b/plugins/sourcedialog/lang/nl.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'nl', {
+ toolbar: 'Code',
+ title: 'Code'
+});
diff --git a/plugins/sourcedialog/lang/no.js b/plugins/sourcedialog/lang/no.js new file mode 100644 index 0000000..7a0fb2e --- /dev/null +++ b/plugins/sourcedialog/lang/no.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'no', {
+ toolbar: 'Kilde',
+ title: 'Kilde'
+});
diff --git a/plugins/sourcedialog/lang/pl.js b/plugins/sourcedialog/lang/pl.js new file mode 100644 index 0000000..b9881e3 --- /dev/null +++ b/plugins/sourcedialog/lang/pl.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'pl', {
+ toolbar: 'Źródło dokumentu',
+ title: 'Źródło dokumentu'
+});
diff --git a/plugins/sourcedialog/lang/pt-br.js b/plugins/sourcedialog/lang/pt-br.js new file mode 100644 index 0000000..85e9d73 --- /dev/null +++ b/plugins/sourcedialog/lang/pt-br.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'pt-br', {
+ toolbar: 'Código-Fonte',
+ title: 'Código-Fonte'
+});
diff --git a/plugins/sourcedialog/lang/pt.js b/plugins/sourcedialog/lang/pt.js new file mode 100644 index 0000000..418782a --- /dev/null +++ b/plugins/sourcedialog/lang/pt.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'pt', {
+ toolbar: 'Fonte',
+ title: 'Fonte'
+});
diff --git a/plugins/sourcedialog/lang/ro.js b/plugins/sourcedialog/lang/ro.js new file mode 100644 index 0000000..ed04773 --- /dev/null +++ b/plugins/sourcedialog/lang/ro.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ro', {
+ toolbar: 'Sursa',
+ title: 'Sursa'
+});
diff --git a/plugins/sourcedialog/lang/ru.js b/plugins/sourcedialog/lang/ru.js new file mode 100644 index 0000000..2b1d328 --- /dev/null +++ b/plugins/sourcedialog/lang/ru.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ru', {
+ toolbar: 'Исходник',
+ title: 'Источник'
+});
diff --git a/plugins/sourcedialog/lang/si.js b/plugins/sourcedialog/lang/si.js new file mode 100644 index 0000000..d827d32 --- /dev/null +++ b/plugins/sourcedialog/lang/si.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'si', {
+ toolbar: 'මුලාශ්රය',
+ title: 'මුලාශ්රය'
+});
diff --git a/plugins/sourcedialog/lang/sk.js b/plugins/sourcedialog/lang/sk.js new file mode 100644 index 0000000..fab4091 --- /dev/null +++ b/plugins/sourcedialog/lang/sk.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'sk', {
+ toolbar: 'Zdroj',
+ title: 'Zdroj'
+});
diff --git a/plugins/sourcedialog/lang/sl.js b/plugins/sourcedialog/lang/sl.js new file mode 100644 index 0000000..fb4c90d --- /dev/null +++ b/plugins/sourcedialog/lang/sl.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'sl', {
+ toolbar: 'Izvorna koda',
+ title: 'Izvorna koda'
+});
diff --git a/plugins/sourcedialog/lang/sq.js b/plugins/sourcedialog/lang/sq.js new file mode 100644 index 0000000..57f0b92 --- /dev/null +++ b/plugins/sourcedialog/lang/sq.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'sq', {
+ toolbar: 'Burimi',
+ title: 'Burimi'
+});
diff --git a/plugins/sourcedialog/lang/sr-latn.js b/plugins/sourcedialog/lang/sr-latn.js new file mode 100644 index 0000000..f836100 --- /dev/null +++ b/plugins/sourcedialog/lang/sr-latn.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'sr-latn', {
+ toolbar: 'Kôd',
+ title: 'Kôd'
+});
diff --git a/plugins/sourcedialog/lang/sr.js b/plugins/sourcedialog/lang/sr.js new file mode 100644 index 0000000..cb08e82 --- /dev/null +++ b/plugins/sourcedialog/lang/sr.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'sr', {
+ toolbar: 'Kôд',
+ title: 'Kôд'
+});
diff --git a/plugins/sourcedialog/lang/sv.js b/plugins/sourcedialog/lang/sv.js new file mode 100644 index 0000000..bb1538d --- /dev/null +++ b/plugins/sourcedialog/lang/sv.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'sv', {
+ toolbar: 'Källa',
+ title: 'Källa'
+});
diff --git a/plugins/sourcedialog/lang/th.js b/plugins/sourcedialog/lang/th.js new file mode 100644 index 0000000..7e873e3 --- /dev/null +++ b/plugins/sourcedialog/lang/th.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'th', {
+ toolbar: 'ดูรหัส HTML',
+ title: 'ดูรหัส HTML'
+});
diff --git a/plugins/sourcedialog/lang/tr.js b/plugins/sourcedialog/lang/tr.js new file mode 100644 index 0000000..d47b691 --- /dev/null +++ b/plugins/sourcedialog/lang/tr.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'tr', {
+ toolbar: 'Kaynak',
+ title: 'Kaynak'
+});
diff --git a/plugins/sourcedialog/lang/ug.js b/plugins/sourcedialog/lang/ug.js new file mode 100644 index 0000000..df3cc74 --- /dev/null +++ b/plugins/sourcedialog/lang/ug.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'ug', {
+ toolbar: 'مەنبە',
+ title: 'مەنبە'
+});
diff --git a/plugins/sourcedialog/lang/uk.js b/plugins/sourcedialog/lang/uk.js new file mode 100644 index 0000000..6e37170 --- /dev/null +++ b/plugins/sourcedialog/lang/uk.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'uk', {
+ toolbar: 'Джерело',
+ title: 'Джерело'
+});
diff --git a/plugins/sourcedialog/lang/vi.js b/plugins/sourcedialog/lang/vi.js new file mode 100644 index 0000000..fc88a52 --- /dev/null +++ b/plugins/sourcedialog/lang/vi.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'vi', {
+ toolbar: 'Mã HTML',
+ title: 'Mã HTML'
+});
diff --git a/plugins/sourcedialog/lang/zh-cn.js b/plugins/sourcedialog/lang/zh-cn.js new file mode 100644 index 0000000..4919438 --- /dev/null +++ b/plugins/sourcedialog/lang/zh-cn.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'zh-cn', {
+ toolbar: '源码',
+ title: '源码'
+});
diff --git a/plugins/sourcedialog/lang/zh.js b/plugins/sourcedialog/lang/zh.js new file mode 100644 index 0000000..7e6bc40 --- /dev/null +++ b/plugins/sourcedialog/lang/zh.js @@ -0,0 +1,9 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.setLang( 'sourcedialog', 'zh', {
+ toolbar: '原始碼',
+ title: '原始碼'
+});
diff --git a/plugins/sourcedialog/plugin.js b/plugins/sourcedialog/plugin.js new file mode 100644 index 0000000..5721b31 --- /dev/null +++ b/plugins/sourcedialog/plugin.js @@ -0,0 +1,26 @@ +/**
+ * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.html or http://ckeditor.com/license
+ */
+
+CKEDITOR.plugins.add( 'sourcedialog', {
+ lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
+ icons: 'sourcedialog,sourcedialog-rtl', // %REMOVE_LINE_CORE%
+
+ init: function( editor ) {
+ // Register the "source" command, which simply opens the "source" dialog.
+ editor.addCommand( 'sourcedialog', new CKEDITOR.dialogCommand( 'sourcedialog' ) );
+
+ // Register the "source" dialog.
+ CKEDITOR.dialog.add( 'sourcedialog', this.path + 'dialogs/sourcedialog.js' );
+
+ // If the toolbar is available, create the "Source" button.
+ if ( editor.ui.addButton ) {
+ editor.ui.addButton( 'Sourcedialog', {
+ label: editor.lang.sourcedialog.toolbar,
+ command: 'sourcedialog',
+ toolbar: 'mode,10'
+ });
+ }
+ }
+});
diff --git a/plugins/sourcedialog/samples/sourcedialog.html b/plugins/sourcedialog/samples/sourcedialog.html new file mode 100644 index 0000000..298e18c --- /dev/null +++ b/plugins/sourcedialog/samples/sourcedialog.html @@ -0,0 +1,118 @@ +<!DOCTYPE html>
+<!--
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+-->
+<html>
+<head>
+ <title>Raw HTML editing with dialog-based source editor — CKEditor Sample</title>
+ <meta charset="utf-8">
+ <script src="../../../ckeditor.js"></script>
+ <link rel="stylesheet" href="../../../samples/sample.css">
+ <meta name="ckeditor-sample-name" content="Raw HTML editing with dialog-based source editor">
+ <meta name="ckeditor-sample-group" content="Plugins">
+ <meta name="ckeditor-sample-description" content="Editing HTML content of both inline and framed editor instances.">
+ <meta name="ckeditor-sample-isnew" content="1">
+ <style>
+
+ #editable
+ {
+ padding: 10px;
+ float: left;
+ }
+
+ </style>
+</head>
+<body>
+ <h1 class="samples">
+ <a href="../../../samples/index.html">CKEditor Samples</a> » Raw HTML editing with dialog-based source editor
+ </h1>
+ <div class="description">
+ <p>
+ <strong>Sourcedialog</strong> plugin provides an easy way to edit raw HTML content
+ of an editor, similarly to what is possible with <strong>Sourcearea</strong>
+ plugin for framed instances but using dialogs. Thanks to that, it's also possible
+ to manipulate raw content of inline editor instances.
+ </p>
+ <p>
+ This plugin extends the toolbar with a button,
+ which opens a dialog window with a source code editor. It works with both framed
+ and inline instances. To enable this
+ plugin, basically add <code>extraPlugins: 'sourcedialog'</code> to editor's
+ config:
+ </p>
+<pre class="samples">
+// Inline editor.
+CKEDITOR.inline( 'editable', {
+ <strong>extraPlugins: 'sourcedialog'</strong>
+});
+
+// Framed editor.
+CKEDITOR.replace( 'textarea_id', {
+ <strong>extraPlugins: 'sourcedialog'</strong>,
+ removePlugins: 'sourcearea'
+});
+</pre>
+ <p>
+ Note that you may want to include <code>removePlugins: 'sourcearea'</code>
+ in your config when using <strong>Sourcedialog</strong> in framed instances.
+ This prevents feature redundancy.
+ </p>
+ <p>
+ Note that <code>editable</code> in the code above is the <code>id</code>
+ attribute of the <code><div></code> element to be converted into an inline instance.
+ </p>
+ <p>
+ Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
+ the <code><textarea></code> element to be replaced with CKEditor.
+ </p>
+ </div>
+ <div>
+ <label for="editor1">
+ Inline editor:
+ </label>
+ <div id="editor1" contenteditable="true" style="padding: 5px 20px;">
+ <p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
+ </div>
+ </div>
+ <br>
+ <div>
+ <label for="editor2">
+ Framed editor:
+ </label>
+ <textarea cols="80" id="editor2" name="editor2" rows="10">
+ This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.
+ </textarea>
+ </div>
+ <script>
+
+ // We need to turn off the automatic editor creation first.
+ CKEDITOR.disableAutoInline = true;
+
+ var config = {
+ toolbarGroups: [
+ { name: 'mode' },
+ { name: 'basicstyles' },
+ { name: 'links' }
+ ],
+ extraPlugins: 'sourcedialog',
+ removePlugins: 'sourcearea'
+ }
+
+ CKEDITOR.inline( 'editor1', config );
+ CKEDITOR.replace( 'editor2', config );
+
+ </script>
+ <div id="footer">
+ <hr>
+ <p>
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
+ http://ckeditor.com</a>
+ </p>
+ <p id="copy">
+ Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a>
+ - Frederico Knabben. All rights reserved.
+ </p>
+ </div>
+</body>
+</html>
|
