Updated ckeditor
|
|
@ -1,4 +1,4 @@
|
|||
CKEDITOR.dialog.add("base64imageDialog",function(c){function p(b){if("string"!=typeof b||!b)e.getElement().setHtml("");else{var f=new Image;e.getElement().setHtml("Loading...");f.onload=function(){e.getElement().setHtml("");null==i||null==h?(d.setValueOf("tab-properties","width",this.width),d.setValueOf("tab-properties","height",this.height),j=1,0<this.height&&0<this.width&&(j=this.width/this.height),0>=j&&(j=1)):h=i=null;this.id=c.id+"previewimage";this.setAttribute("style","max-width:400px;max-height:100px;");
|
||||
CKEDITOR.dialog.add("base64imageDialog",function(c){function p(b){if("string"!=typeof b||!b)e.getElement().setHtml("");else{var f=new Image;e.getElement().setHtml("Loading...");f.onload=function(){e.getElement().setHtml("");null==i||null==h?(d.setValueOf("tab-properties","width",this.width),d.setValueOf("tab-properties","height",this.height),j=1,0<this.height&&0<this.width&&(j=this.width/this.height),0>=j&&(j=1)):h=i=null;this.id=c.id+"previewimage";this.setAttribute("style","max-width:400px;max-height:100px;");
|
||||
this.setAttribute("alt","");try{var b=e.getElement().$;b&&b.appendChild(this)}catch(f){}};f.onerror=function(){e.getElement().setHtml("")};f.onabort=function(){e.getElement().setHtml("")};f.src=b}}function n(b){e.getElement().setHtml("");if("base64"==b)l&&l.setValue(!1,!0),m&&m.setValue(!1,!0);else if("url"==b)l&&l.setValue(!0,!0),m&&m.setValue(!1,!0),q&&p(q.getValue());else if(r){l&&l.setValue(!1,!0);m&&m.setValue(!0,!0);var f=d.getContentElement("tab-source","file"),b=null;try{b=f.getInputElement().$}catch(a){b=
|
||||
null}if(b&&("files"in b&&b.files&&0<b.files.length&&b.files[0])&&(!("type"in b.files[0])||b.files[0].type.match("image.*"))&&FileReader)e.getElement().setHtml("Loading..."),f=new FileReader,f.onload=function(){return function(b){e.getElement().setHtml("");p(b.target.result)}}(b.files[0]),f.onerror=function(){e.getElement().setHtml("")},f.onabort=function(){e.getElement().setHtml("")},f.readAsDataURL(b.files[0])}}function s(b){var f=d.getContentElement("tab-properties","width").getValue(),a=d.getContentElement("tab-properties",
|
||||
"height").getValue(),c="px",g="px";0<=f.indexOf("%")&&(c="%");0<=a.indexOf("%")&&(g="%");f=parseInt(f,10);a=parseInt(a,10);isNaN(f)&&(f=0);isNaN(a)&&(a=0);var e="px";"width"==b?("%"==c&&(e="%"),a=Math.round(f/j)):("%"==g&&(e="%"),f=Math.round(a*j));"%"==e&&(f+="%",a+="%");d.getContentElement("tab-properties","width").setValue(f);d.getContentElement("tab-properties","height").setValue(a)}function t(b){var a=b.getValue(),c="";0<=a.indexOf("%")&&(c="%");a=parseInt(a,10);isNaN(a)&&(a=0);b.setValue(a+
|
||||
|
|
|
|||
BIN
vendors/ckeditor/plugins/bidi/icons/bidiltr.png
vendored
|
Before Width: | Height: | Size: 769 B |
BIN
vendors/ckeditor/plugins/bidi/icons/bidirtl.png
vendored
|
Before Width: | Height: | Size: 768 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
8
vendors/ckeditor/plugins/bidi/lang/af.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'af', {
|
||||
ltr: 'Skryfrigting van links na regs',
|
||||
rtl: 'Skryfrigting van regs na links'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ar.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ar', {
|
||||
ltr: 'إتجاه النص من اليسار إلى اليمين',
|
||||
rtl: 'إتجاه النص من اليمين إلى اليسار'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/bg.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'bg', {
|
||||
ltr: 'Посока на текста от ляво на дясно',
|
||||
rtl: 'Посока на текста от дясно на ляво'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/bn.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'bn', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/bs.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'bs', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ca.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ca', {
|
||||
ltr: 'Direcció del text d\'esquerra a dreta',
|
||||
rtl: 'Direcció del text de dreta a esquerra'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/cs.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'cs', {
|
||||
ltr: 'Směr textu zleva doprava',
|
||||
rtl: 'Směr textu zprava doleva'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/cy.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'cy', {
|
||||
ltr: 'Cyfeiriad testun o\'r chwith i\'r dde',
|
||||
rtl: 'Cyfeiriad testun o\'r dde i\'r chwith'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/da.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'da', {
|
||||
ltr: 'Tekstretning fra venstre til højre',
|
||||
rtl: 'Tekstretning fra højre til venstre'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/de.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'de', {
|
||||
ltr: 'Leserichtung von Links nach Rechts',
|
||||
rtl: 'Leserichtung von Rechts nach Links'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/el.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'el', {
|
||||
ltr: 'Διεύθυνση κειμένου από αριστερά στα δεξιά',
|
||||
rtl: 'Διεύθυνση κειμένου από δεξιά στα αριστερά'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/en-au.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'en-au', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/en-ca.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'en-ca', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/en-gb.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'en-gb', {
|
||||
ltr: 'Text direction from left to right',
|
||||
rtl: 'Text direction from right to left'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/en.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'en', {
|
||||
ltr: 'Text direction from left to right',
|
||||
rtl: 'Text direction from right to left'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/eo.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'eo', {
|
||||
ltr: 'Tekstdirekto de maldekstre dekstren',
|
||||
rtl: 'Tekstdirekto de dekstre maldekstren'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/es.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'es', {
|
||||
ltr: 'Dirección del texto de izquierda a derecha',
|
||||
rtl: 'Dirección del texto de derecha a izquierda'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/et.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'et', {
|
||||
ltr: 'Teksti suund vasakult paremale',
|
||||
rtl: 'Teksti suund paremalt vasakule'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/eu.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'eu', {
|
||||
ltr: 'Testuaren norantza ezkerretik eskuinera',
|
||||
rtl: 'Testuaren norantza eskuinetik ezkerrera'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/fa.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'fa', {
|
||||
ltr: 'جهت متن از چپ به راست',
|
||||
rtl: 'جهت متن از راست به چپ'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/fi.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'fi', {
|
||||
ltr: 'Tekstin suunta vasemmalta oikealle',
|
||||
rtl: 'Tekstin suunta oikealta vasemmalle'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/fo.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'fo', {
|
||||
ltr: 'Tekstkós frá vinstru til høgru',
|
||||
rtl: 'Tekstkós frá høgru til vinstru'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/fr-ca.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'fr-ca', {
|
||||
ltr: 'Direction du texte de gauche à droite',
|
||||
rtl: 'Direction du texte de droite à gauche'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/fr.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'fr', {
|
||||
ltr: 'Direction du texte de la gauche vers la droite',
|
||||
rtl: 'Direction du texte de la droite vers la gauche'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/gl.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'gl', {
|
||||
ltr: 'Dirección do texto de esquerda a dereita',
|
||||
rtl: 'Dirección do texto de dereita a esquerda'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/gu.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'gu', {
|
||||
ltr: 'ટેક્ષ્ત્ ની દિશા ડાબે થી જમણે',
|
||||
rtl: 'ટેક્ષ્ત્ ની દિશા જમણે થી ડાબે'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/he.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'he', {
|
||||
ltr: 'כיוון טקסט משמאל לימין (LTR)',
|
||||
rtl: 'כיוון טקסט מימין לשמאל (RTL)'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/hi.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'hi', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/hr.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'hr', {
|
||||
ltr: 'Smjer teksta s lijeva na desno',
|
||||
rtl: 'Smjer teksta s desna na lijevo'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/hu.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'hu', {
|
||||
ltr: 'Szöveg iránya balról jobbra',
|
||||
rtl: 'Szöveg iránya jobbról balra'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/id.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'id', {
|
||||
ltr: 'Arah penulisan dari kiri ke kanan.',
|
||||
rtl: 'Arah penulisan dari kanan ke kiri.'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/is.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'is', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/it.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'it', {
|
||||
ltr: 'Direzione del testo da sinistra verso destra',
|
||||
rtl: 'Direzione del testo da destra verso sinistra'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ja.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ja', {
|
||||
ltr: 'テキストの向き : 左から右へ',
|
||||
rtl: 'テキストの向き : 右から左へ'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ka.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ka', {
|
||||
ltr: 'ტექსტის მიმართულება მარცხნიდან მარჯვნივ',
|
||||
rtl: 'ტექსტის მიმართულება მარჯვნიდან მარცხნივ'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/km.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'km', {
|
||||
ltr: 'ទិសដៅអក្សរពីឆ្វេងទៅស្ដាំ',
|
||||
rtl: 'ទិសដៅអក្សរពីស្ដាំទៅឆ្វេង'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ko.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ko', {
|
||||
ltr: '택스트 방향이 왼쪽에서 오른쪽으로 ',
|
||||
rtl: '택스트 방향이 오른쪽에서 왼쪽으로'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ku.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ku', {
|
||||
ltr: 'ئاراستەی نووسە لە چەپ بۆ ڕاست',
|
||||
rtl: 'ئاراستەی نووسە لە ڕاست بۆ چەپ'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/lt.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'lt', {
|
||||
ltr: 'Tekstas iš kairės į dešinę',
|
||||
rtl: 'Tekstas iš dešinės į kairę'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/lv.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'lv', {
|
||||
ltr: 'Teksta virziens no kreisās uz labo',
|
||||
rtl: 'Teksta virziens no labās uz kreiso'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/mk.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'mk', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/mn.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'mn', {
|
||||
ltr: 'Зүүнээс баруун тийш бичлэг',
|
||||
rtl: 'Баруунаас зүүн тийш бичлэг'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ms.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ms', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/nb.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'nb', {
|
||||
ltr: 'Tekstretning fra venstre til høyre',
|
||||
rtl: 'Tekstretning fra høyre til venstre'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/nl.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'nl', {
|
||||
ltr: 'Schrijfrichting van links naar rechts',
|
||||
rtl: 'Schrijfrichting van rechts naar links'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/no.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'no', {
|
||||
ltr: 'Tekstretning fra venstre til høyre',
|
||||
rtl: 'Tekstretning fra høyre til venstre'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/pl.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'pl', {
|
||||
ltr: 'Kierunek tekstu od lewej strony do prawej',
|
||||
rtl: 'Kierunek tekstu od prawej strony do lewej'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/pt-br.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'pt-br', {
|
||||
ltr: 'Direção do texto da esquerda para a direita',
|
||||
rtl: 'Direção do texto da direita para a esquerda'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/pt.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'pt', {
|
||||
ltr: 'Direção do texto da esquerda para a direita',
|
||||
rtl: 'Direção do texto da direita para a esquerda'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ro.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ro', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ru.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ru', {
|
||||
ltr: 'Направление текста слева направо',
|
||||
rtl: 'Направление текста справа налево'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/si.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'si', {
|
||||
ltr: 'වගන්ති දිශාව වමේ සිට දකුණට',
|
||||
rtl: 'වගන්ති දිශාව දකුණේ සිට වමට'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/sk.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'sk', {
|
||||
ltr: 'Smer textu zľava doprava',
|
||||
rtl: 'Smer textu sprava doľava'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/sl.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'sl', {
|
||||
ltr: 'Smer besedila od leve proti desni',
|
||||
rtl: 'Smer besedila od desne proti levi'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/sq.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'sq', {
|
||||
ltr: 'Drejtimi i tekstit nga e majta në të djathtë',
|
||||
rtl: 'Drejtimi i tekstit nga e djathta në të majtë'
|
||||
} );
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'sr-latn', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/sr.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'sr', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/sv.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'sv', {
|
||||
ltr: 'Text riktning från vänster till höger',
|
||||
rtl: 'Text riktning från höger till vänster'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/th.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'th', {
|
||||
ltr: 'Text direction from left to right', // MISSING
|
||||
rtl: 'Text direction from right to left' // MISSING
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/tr.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'tr', {
|
||||
ltr: 'Metin yönü soldan sağa',
|
||||
rtl: 'Metin yönü sağdan sola'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/tt.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'tt', {
|
||||
ltr: 'Сулдан уңга язылыш',
|
||||
rtl: 'Уңнан сулга язылыш'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/ug.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'ug', {
|
||||
ltr: 'تېكىست يۆنىلىشى سولدىن ئوڭغا',
|
||||
rtl: 'تېكىست يۆنىلىشى ئوڭدىن سولغا'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/uk.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'uk', {
|
||||
ltr: 'Напрямок тексту зліва направо',
|
||||
rtl: 'Напрямок тексту справа наліво'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/vi.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'vi', {
|
||||
ltr: 'Văn bản hướng từ trái sang phải',
|
||||
rtl: 'Văn bản hướng từ phải sang trái'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/zh-cn.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'zh-cn', {
|
||||
ltr: '文字方向为从左至右',
|
||||
rtl: '文字方向为从右至左'
|
||||
} );
|
||||
8
vendors/ckeditor/plugins/bidi/lang/zh.js
vendored
|
|
@ -1,8 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.plugins.setLang( 'bidi', 'zh', {
|
||||
ltr: '文字方向從左至右',
|
||||
rtl: '文字方向從右至左'
|
||||
} );
|
||||
305
vendors/ckeditor/plugins/bidi/plugin.js
vendored
|
|
@ -1,305 +0,0 @@
|
|||
/**
|
||||
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
( function() {
|
||||
var guardElements = { table: 1, ul: 1, ol: 1, blockquote: 1, div: 1 },
|
||||
directSelectionGuardElements = {},
|
||||
// All guard elements which can have a direction applied on them.
|
||||
allGuardElements = {};
|
||||
CKEDITOR.tools.extend( directSelectionGuardElements, guardElements, { tr: 1, p: 1, div: 1, li: 1 } );
|
||||
CKEDITOR.tools.extend( allGuardElements, directSelectionGuardElements, { td: 1 } );
|
||||
|
||||
function setToolbarStates( editor, path ) {
|
||||
var useComputedState = editor.config.useComputedState,
|
||||
selectedElement;
|
||||
|
||||
useComputedState = useComputedState === undefined || useComputedState;
|
||||
|
||||
// We can use computedState provided by the browser or traverse parents manually.
|
||||
if ( !useComputedState )
|
||||
selectedElement = getElementForDirection( path.lastElement, editor.editable() );
|
||||
|
||||
selectedElement = selectedElement || path.block || path.blockLimit;
|
||||
|
||||
// If we're having BODY here, user probably done CTRL+A, let's try to get the enclosed node, if any.
|
||||
if ( selectedElement.equals( editor.editable() ) ) {
|
||||
var enclosedNode = editor.getSelection().getRanges()[ 0 ].getEnclosedNode();
|
||||
enclosedNode && enclosedNode.type == CKEDITOR.NODE_ELEMENT && ( selectedElement = enclosedNode );
|
||||
}
|
||||
|
||||
if ( !selectedElement )
|
||||
return;
|
||||
|
||||
var selectionDir = useComputedState ? selectedElement.getComputedStyle( 'direction' ) : selectedElement.getStyle( 'direction' ) || selectedElement.getAttribute( 'dir' );
|
||||
|
||||
editor.getCommand( 'bidirtl' ).setState( selectionDir == 'rtl' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
|
||||
editor.getCommand( 'bidiltr' ).setState( selectionDir == 'ltr' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
|
||||
}
|
||||
|
||||
function handleMixedDirContent( editor, path ) {
|
||||
var directionNode = path.block || path.blockLimit || editor.editable();
|
||||
var pathDir = directionNode.getDirection( 1 );
|
||||
if ( pathDir != ( editor._.selDir || editor.lang.dir ) ) {
|
||||
editor._.selDir = pathDir;
|
||||
editor.fire( 'contentDirChanged', pathDir );
|
||||
}
|
||||
}
|
||||
|
||||
// Returns element with possibility of applying the direction.
|
||||
// @param node
|
||||
function getElementForDirection( node, root ) {
|
||||
while ( node && !( node.getName() in allGuardElements || node.equals( root ) ) ) {
|
||||
var parent = node.getParent();
|
||||
if ( !parent )
|
||||
break;
|
||||
|
||||
node = parent;
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function switchDir( element, dir, editor, database ) {
|
||||
if ( element.isReadOnly() || element.equals( editor.editable() ) )
|
||||
return;
|
||||
|
||||
// Mark this element as processed by switchDir.
|
||||
CKEDITOR.dom.element.setMarker( database, element, 'bidi_processed', 1 );
|
||||
|
||||
// Check whether one of the ancestors has already been styled.
|
||||
var parent = element,
|
||||
editable = editor.editable();
|
||||
while ( ( parent = parent.getParent() ) && !parent.equals( editable ) ) {
|
||||
if ( parent.getCustomData( 'bidi_processed' ) ) {
|
||||
// Ancestor style must dominate.
|
||||
element.removeStyle( 'direction' );
|
||||
element.removeAttribute( 'dir' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var useComputedState = ( 'useComputedState' in editor.config ) ? editor.config.useComputedState : 1;
|
||||
|
||||
var elementDir = useComputedState ? element.getComputedStyle( 'direction' ) : element.getStyle( 'direction' ) || element.hasAttribute( 'dir' );
|
||||
|
||||
// Stop if direction is same as present.
|
||||
if ( elementDir == dir )
|
||||
return;
|
||||
|
||||
// Clear direction on this element.
|
||||
element.removeStyle( 'direction' );
|
||||
|
||||
// Do the second check when computed state is ON, to check
|
||||
// if we need to apply explicit direction on this element.
|
||||
if ( useComputedState ) {
|
||||
element.removeAttribute( 'dir' );
|
||||
if ( dir != element.getComputedStyle( 'direction' ) )
|
||||
element.setAttribute( 'dir', dir );
|
||||
} else
|
||||
// Set new direction for this element.
|
||||
element.setAttribute( 'dir', dir );
|
||||
|
||||
editor.forceNextSelectionCheck();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function getFullySelected( range, elements, enterMode ) {
|
||||
var ancestor = range.getCommonAncestor( false, true );
|
||||
|
||||
range = range.clone();
|
||||
range.enlarge( enterMode == CKEDITOR.ENTER_BR ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS );
|
||||
|
||||
if ( range.checkBoundaryOfElement( ancestor, CKEDITOR.START ) && range.checkBoundaryOfElement( ancestor, CKEDITOR.END ) ) {
|
||||
var parent;
|
||||
while ( ancestor && ancestor.type == CKEDITOR.NODE_ELEMENT && ( parent = ancestor.getParent() ) && parent.getChildCount() == 1 && !( ancestor.getName() in elements ) )
|
||||
ancestor = parent;
|
||||
|
||||
return ancestor.type == CKEDITOR.NODE_ELEMENT && ( ancestor.getName() in elements ) && ancestor;
|
||||
}
|
||||
}
|
||||
|
||||
function bidiCommand( dir ) {
|
||||
return {
|
||||
// It applies to a "block-like" context.
|
||||
context: 'p',
|
||||
allowedContent: {
|
||||
'h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td': {
|
||||
propertiesOnly: true,
|
||||
attributes: 'dir'
|
||||
}
|
||||
},
|
||||
requiredContent: 'p[dir]',
|
||||
refresh: function( editor, path ) {
|
||||
setToolbarStates( editor, path );
|
||||
handleMixedDirContent( editor, path );
|
||||
},
|
||||
exec: function( editor ) {
|
||||
var selection = editor.getSelection(),
|
||||
enterMode = editor.config.enterMode,
|
||||
ranges = selection.getRanges();
|
||||
|
||||
if ( ranges && ranges.length ) {
|
||||
var database = {};
|
||||
|
||||
// Creates bookmarks for selection, as we may split some blocks.
|
||||
var bookmarks = selection.createBookmarks();
|
||||
|
||||
var rangeIterator = ranges.createIterator(),
|
||||
range,
|
||||
i = 0;
|
||||
|
||||
while ( ( range = rangeIterator.getNextRange( 1 ) ) ) {
|
||||
// Apply do directly selected elements from guardElements.
|
||||
var selectedElement = range.getEnclosedNode();
|
||||
|
||||
// If this is not our element of interest, apply to fully selected elements from guardElements.
|
||||
if ( !selectedElement || selectedElement && !( selectedElement.type == CKEDITOR.NODE_ELEMENT && selectedElement.getName() in directSelectionGuardElements ) )
|
||||
selectedElement = getFullySelected( range, guardElements, enterMode );
|
||||
|
||||
selectedElement && switchDir( selectedElement, dir, editor, database );
|
||||
|
||||
var iterator, block;
|
||||
|
||||
// Walker searching for guardElements.
|
||||
var walker = new CKEDITOR.dom.walker( range );
|
||||
|
||||
var start = bookmarks[ i ].startNode,
|
||||
end = bookmarks[ i++ ].endNode;
|
||||
|
||||
walker.evaluator = function( node ) {
|
||||
return !!( node.type == CKEDITOR.NODE_ELEMENT && node.getName() in guardElements && !( node.getName() == ( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) && node.getParent().type == CKEDITOR.NODE_ELEMENT && node.getParent().getName() == 'blockquote' )
|
||||
// Element must be fully included in the range as well. (#6485).
|
||||
&& node.getPosition( start ) & CKEDITOR.POSITION_FOLLOWING && ( ( node.getPosition( end ) & CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_CONTAINS ) == CKEDITOR.POSITION_PRECEDING ) );
|
||||
};
|
||||
|
||||
while ( ( block = walker.next() ) )
|
||||
switchDir( block, dir, editor, database );
|
||||
|
||||
iterator = range.createIterator();
|
||||
iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;
|
||||
|
||||
while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) )
|
||||
switchDir( block, dir, editor, database );
|
||||
}
|
||||
|
||||
CKEDITOR.dom.element.clearAllMarkers( database );
|
||||
|
||||
editor.forceNextSelectionCheck();
|
||||
// Restore selection position.
|
||||
selection.selectBookmarks( bookmarks );
|
||||
|
||||
editor.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
CKEDITOR.plugins.add( 'bidi', {
|
||||
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,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
|
||||
icons: 'bidiltr,bidirtl', // %REMOVE_LINE_CORE%
|
||||
hidpi: true, // %REMOVE_LINE_CORE%
|
||||
init: function( editor ) {
|
||||
if ( editor.blockless )
|
||||
return;
|
||||
|
||||
// All buttons use the same code to register. So, to avoid
|
||||
// duplications, let's use this tool function.
|
||||
function addButtonCommand( buttonName, buttonLabel, commandName, commandDef, order ) {
|
||||
editor.addCommand( commandName, new CKEDITOR.command( editor, commandDef ) );
|
||||
|
||||
if ( editor.ui.addButton ) {
|
||||
editor.ui.addButton( buttonName, {
|
||||
label: buttonLabel,
|
||||
command: commandName,
|
||||
toolbar: 'bidi,' + order
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
var lang = editor.lang.bidi;
|
||||
|
||||
addButtonCommand( 'BidiLtr', lang.ltr, 'bidiltr', bidiCommand( 'ltr' ), 10 );
|
||||
addButtonCommand( 'BidiRtl', lang.rtl, 'bidirtl', bidiCommand( 'rtl' ), 20 );
|
||||
|
||||
editor.on( 'contentDom', function() {
|
||||
editor.document.on( 'dirChanged', function( evt ) {
|
||||
editor.fire( 'dirChanged', {
|
||||
node: evt.data,
|
||||
dir: evt.data.getDirection( 1 )
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Indicate that the current selection is in different direction than the UI.
|
||||
editor.on( 'contentDirChanged', function( evt ) {
|
||||
var func = ( editor.lang.dir != evt.data ? 'add' : 'remove' ) + 'Class';
|
||||
var toolbar = editor.ui.space( editor.config.toolbarLocation );
|
||||
if ( toolbar )
|
||||
toolbar[ func ]( 'cke_mixed_dir_content' );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
// If the element direction changed, we need to switch the margins of
|
||||
// the element and all its children, so it will get really reflected
|
||||
// like a mirror. (#5910)
|
||||
function isOffline( el ) {
|
||||
var html = el.getDocument().getBody().getParent();
|
||||
while ( el ) {
|
||||
if ( el.equals( html ) )
|
||||
return false;
|
||||
el = el.getParent();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function dirChangeNotifier( org ) {
|
||||
var isAttribute = org == elementProto.setAttribute,
|
||||
isRemoveAttribute = org == elementProto.removeAttribute,
|
||||
dirStyleRegexp = /\bdirection\s*:\s*(.*?)\s*(:?$|;)/;
|
||||
|
||||
return function( name, val ) {
|
||||
if ( !this.isReadOnly() ) {
|
||||
var orgDir;
|
||||
if ( ( name == ( isAttribute || isRemoveAttribute ? 'dir' : 'direction' ) || name == 'style' && ( isRemoveAttribute || dirStyleRegexp.test( val ) ) ) && !isOffline( this ) ) {
|
||||
orgDir = this.getDirection( 1 );
|
||||
var retval = org.apply( this, arguments );
|
||||
if ( orgDir != this.getDirection( 1 ) ) {
|
||||
this.getDocument().fire( 'dirChanged', this );
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return org.apply( this, arguments );
|
||||
};
|
||||
}
|
||||
|
||||
var elementProto = CKEDITOR.dom.element.prototype,
|
||||
methods = [ 'setStyle', 'removeStyle', 'setAttribute', 'removeAttribute' ];
|
||||
for ( var i = 0; i < methods.length; i++ )
|
||||
elementProto[ methods[ i ] ] = CKEDITOR.tools.override( elementProto[ methods[ i ] ], dirChangeNotifier );
|
||||
} )();
|
||||
|
||||
/**
|
||||
* Fired when the language direction of an element is changed.
|
||||
*
|
||||
* @event dirChanged
|
||||
* @member CKEDITOR.editor
|
||||
* @param {CKEDITOR.editor} editor This editor instance.
|
||||
* @param data
|
||||
* @param {CKEDITOR.dom.node} data.node The element that is being changed.
|
||||
* @param {String} data.dir The new direction.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fired when the language direction in the specific cursor position is changed
|
||||
*
|
||||
* @event contentDirChanged
|
||||
* @member CKEDITOR.editor
|
||||
* @param {CKEDITOR.editor} editor This editor instance.
|
||||
* @param {String} data The direction in the current position.
|
||||
*/
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add("paste",function(c){function h(a){var b=new CKEDITOR.dom.document(a.document),f=b.getBody(),d=b.getById("cke_actscrpt");d&&d.remove();f.setAttribute("contenteditable",!0);if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){var a=a.data,b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
|
|
|
|||
5
vendors/ckeditor/plugins/fastimage/dialogs/fastimage.js
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
(function(){CKEDITOR.dialog.add("fastimage",function(){});CKEDITOR.dialog.add("imagebutton",function(){})})();
|
||||
BIN
vendors/ckeditor/plugins/fastimage/images/noimage.png
vendored
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
vendors/ckeditor/plugins/icons.png
vendored
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 9.5 KiB |
BIN
vendors/ckeditor/plugins/icons_hidpi.png
vendored
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
|
|
@ -1,13 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
(function(){var r=function(c,j){function r(){var a=arguments,b=this.getContentElement("advanced","txtdlgGenStyle");b&&b.commit.apply(b,a);this.foreach(function(b){b.commit&&"txtdlgGenStyle"!=b.id&&b.commit.apply(b,a)})}function i(a){if(!s){s=1;var b=this.getDialog(),d=b.imageElement;if(d){this.commit(f,d);for(var a=[].concat(a),e=a.length,c,g=0;g<e;g++)(c=b.getContentElement.apply(b,a[g].split(":")))&&c.setup(f,d)}s=0}}var f=1,k=/^\s*(\d+)((px)|\%)?\s*$/i,v=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,o=/^\d+px$/,
|
||||
w=function(){var a=this.getValue(),b=this.getDialog(),d=a.match(k);d&&("%"==d[2]&&l(b,!1),a=d[1]);b.lockRatio&&(d=b.originalElement,"true"==d.getCustomData("isReady")&&("txtHeight"==this.id?(a&&"0"!=a&&(a=Math.round(d.$.width*(a/d.$.height))),isNaN(a)||b.setValueOf("info","txtWidth",a)):(a&&"0"!=a&&(a=Math.round(d.$.height*(a/d.$.width))),isNaN(a)||b.setValueOf("info","txtHeight",a))));g(b)},g=function(a){if(!a.originalElement||!a.preview)return 1;a.commitContent(4,a.preview);return 0},s,l=function(a,
|
||||
b){if(!a.getContentElement("info","ratioLock"))return null;var d=a.originalElement;if(!d)return null;if("check"==b){if(!a.userlockRatio&&"true"==d.getCustomData("isReady")){var e=a.getValueOf("info","txtWidth"),c=a.getValueOf("info","txtHeight"),d=1E3*d.$.width/d.$.height,f=1E3*e/c;a.lockRatio=!1;!e&&!c?a.lockRatio=!0:!isNaN(d)&&!isNaN(f)&&Math.round(d)==Math.round(f)&&(a.lockRatio=!0)}}else void 0!=b?a.lockRatio=b:(a.userlockRatio=1,a.lockRatio=!a.lockRatio);e=CKEDITOR.document.getById(p);a.lockRatio?
|
||||
b){if(!a.getContentElement("info","ratioLock"))return null;var d=a.originalElement;if(!d)return null;if("check"==b){if(!a.userlockRatio&&"true"==d.getCustomData("isReady")){var e=a.getValueOf("info","txtWidth"),c=a.getValueOf("info","txtHeight"),d=1E3*d.$.width/d.$.height,f=1E3*e/c;a.lockRatio=!1;!e&&!c?a.lockRatio=!0:!isNaN(d)&&!isNaN(f)&&Math.round(d)==Math.round(f)&&(a.lockRatio=!0)}}else void 0!==b?a.lockRatio=b:(a.userlockRatio=1,a.lockRatio=!a.lockRatio);e=CKEDITOR.document.getById(p);a.lockRatio?
|
||||
e.removeClass("cke_btn_unlocked"):e.addClass("cke_btn_unlocked");e.setAttribute("aria-checked",a.lockRatio);CKEDITOR.env.hc&&e.getChild(0).setHtml(a.lockRatio?CKEDITOR.env.ie?"■":"▣":CKEDITOR.env.ie?"□":"▢");return a.lockRatio},x=function(a){var b=a.originalElement;if("true"==b.getCustomData("isReady")){var d=a.getContentElement("info","txtWidth"),e=a.getContentElement("info","txtHeight");d&&d.setValue(b.$.width);e&&e.setValue(b.$.height)}g(a)},y=function(a,b){function d(a,b){var d=a.match(k);return d?
|
||||
("%"==d[2]&&(d[1]+="%",l(e,!1)),d[1]):b}if(a==f){var e=this.getDialog(),c="",g="txtWidth"==this.id?"width":"height",h=b.getAttribute(g);h&&(c=d(h,c));c=d(b.getStyle(g),c);this.setValue(c)}},t,q=function(){var a=this.originalElement,b=CKEDITOR.document.getById(m);a.setCustomData("isReady","true");a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);b&&b.setStyle("display","none");this.dontResetSize||x(this);this.firstLoad&&CKEDITOR.tools.setTimeout(function(){l(this,"check")},
|
||||
0,this);this.dontResetSize=this.firstLoad=!1},h=function(){var a=this.originalElement,b=CKEDITOR.document.getById(m);a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);a=CKEDITOR.getUrl(CKEDITOR.plugins.get("image").path+"images/noimage.png");this.preview&&this.preview.setAttribute("src",a);b&&b.setStyle("display","none");l(this,!1)},n=function(a){return CKEDITOR.tools.getNextId()+"_"+a},p=n("btnLockSizes"),u=n("btnResetSize"),m=n("ImagePreviewLoader"),A=n("previewLink"),
|
||||
0,this);this.dontResetSize=this.firstLoad=!1;g(this)},h=function(){var a=this.originalElement,b=CKEDITOR.document.getById(m);a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);a=CKEDITOR.getUrl(CKEDITOR.plugins.get("image").path+"images/noimage.png");this.preview&&this.preview.setAttribute("src",a);b&&b.setStyle("display","none");l(this,!1)},n=function(a){return CKEDITOR.tools.getNextId()+"_"+a},p=n("btnLockSizes"),u=n("btnResetSize"),m=n("ImagePreviewLoader"),A=n("previewLink"),
|
||||
z=n("previewImage");return{title:c.lang.image["image"==j?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.linkEditMode=this.imageEditMode=this.linkElement=this.imageElement=!1;this.lockRatio=!0;this.userlockRatio=0;this.dontResetSize=!1;this.firstLoad=!0;this.addLink=!1;var a=this.getParentEditor(),b=a.getSelection(),d=(b=b&&b.getSelectedElement())&&a.elementPath(b).contains("a",1),c=CKEDITOR.document.getById(m);c&&c.setStyle("display","none");t=new CKEDITOR.dom.element("img",
|
||||
a.document);this.preview=CKEDITOR.document.getById(z);this.originalElement=a.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(d){this.linkElement=d;this.linkEditMode=!0;c=d.getChildren();if(1==c.count()){var g=c.getItem(0).getName();if("img"==g||"input"==g)this.imageElement=c.getItem(0),"img"==this.imageElement.getName()?this.imageEditMode="img":"input"==this.imageElement.getName()&&(this.imageEditMode="input")}"image"==
|
||||
j&&this.setupContent(2,d)}if(this.customImageElement)this.imageEditMode="img",this.imageElement=this.customImageElement,delete this.customImageElement;else if(b&&"img"==b.getName()&&!b.data("cke-realelement")||b&&"input"==b.getName()&&"image"==b.getAttribute("type"))this.imageEditMode=b.getName(),this.imageElement=b;this.imageEditMode?(this.cleanImageElement=this.imageElement,this.imageElement=this.cleanImageElement.clone(!0,!0),this.setupContent(f,this.imageElement)):this.imageElement=a.document.createElement("img");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add("image2",function(j){function z(){var a=this.getValue().match(A);(a=!!(a&&0!==parseInt(a[1],10)))||alert(c["invalid"+CKEDITOR.tools.capitalize(this.id)]);return a}function K(){function a(a,b){d.push(i.once(a,function(a){for(var i;i=d.pop();)i.removeListener();b(a)}))}var i=p.createElement("img"),d=[];return function(d,b,c){a("load",function(){var a=B(i);b.call(c,i,a.width,a.height)});a("error",function(){b(null)});a("abort",function(){b(null)});i.setAttribute("src",(t.baseHref||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add("anchor",function(c){function d(a,b){return a.createFakeElement(a.document.createElement("a",{attributes:b}),"cke_anchor","anchor")}return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var a=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:a,name:a,"data-cke-saved-name":a};if(this._.selectedElement)this._.selectedElement.data("cke-realelement")?(a=d(c,a),a.replace(this._.selectedElement),CKEDITOR.env.ie&&c.getSelection().selectElement(a)):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
(function(){CKEDITOR.dialog.add("link",function(g){var l=CKEDITOR.plugins.link,m=function(){var a=this.getDialog(),b=a.getContentElement("target","popupFeatures"),a=a.getContentElement("target","linkTargetName"),k=this.getValue();if(b&&a)switch(b=b.getElement(),b.hide(),a.setValue(""),k){case "frame":a.setLabel(g.lang.link.targetFrameName);a.getElement().show();break;case "popup":b.show();a.setLabel(g.lang.link.targetPopupName);a.getElement().show();break;default:a.setValue(k),a.getElement().hide()}},
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.9 KiB |
BIN
vendors/ckeditor/plugins/plain/icons/hidpi/plain.png
vendored
|
Before Width: | Height: | Size: 2 KiB |
BIN
vendors/ckeditor/plugins/plain/icons/plain-rtl.png
vendored
|
Before Width: | Height: | Size: 762 B |
BIN
vendors/ckeditor/plugins/plain/icons/plain.png
vendored
|
Before Width: | Height: | Size: 764 B |
177
vendors/ckeditor/plugins/plain/plugin.js
vendored
|
|
@ -1,177 +0,0 @@
|
|||
|
||||
(function() {
|
||||
|
||||
var
|
||||
simplePlainToHtml = function (sPlain) {
|
||||
return sPlain
|
||||
.replace(/&/g, '&')
|
||||
.replace(/>/g, '>').replace(/</g, '<')
|
||||
.replace(/[\-_~]{10,}/g, '<hr />')
|
||||
.replace(/\n/g, '<br />')
|
||||
.replace(/ /g, ' ')
|
||||
;
|
||||
},
|
||||
simpleHtmlToPlain = function (sHtml) {
|
||||
|
||||
var sText = sHtml
|
||||
.replace(/[\s]+/gm, ' ')
|
||||
.replace(/<br[^>]*>/gmi, '\n')
|
||||
.replace(/<\/h[\d]>/gi, '\n')
|
||||
.replace(/<\/p>/gi, '\n\n')
|
||||
.replace(/<\/li>/gi, '\n')
|
||||
.replace(/<\/td>/gi, '\n')
|
||||
.replace(/<\/tr>/gi, '\n')
|
||||
.replace(/<\/div>/gi, '\n')
|
||||
.replace(/<blockquote[^>]*>/gmi, '\n')
|
||||
.replace(/<\/blockquote>/gi, '\n')
|
||||
.replace(/<hr[^>]*>/gmi, '\n_______________________________\n\n')
|
||||
.replace(/ /gi, ' ')
|
||||
.replace(/"/gi, '"')
|
||||
.replace(/<[^>]*>/gm, '')
|
||||
;
|
||||
|
||||
sText = $('<div></div>').html(sText).text();
|
||||
|
||||
sText = sText
|
||||
.replace(/\n[ \t]+/gm, '\n')
|
||||
.replace(/[\n]{3,}/gm, '\n\n')
|
||||
.replace(/>/gi, '>')
|
||||
.replace(/</gi, '<')
|
||||
.replace(/&/gi, '&')
|
||||
;
|
||||
|
||||
return sText;
|
||||
}
|
||||
;
|
||||
|
||||
CKEDITOR.plugins.add('plain', {
|
||||
lang: '',
|
||||
icons: 'plain',
|
||||
hidpi: true,
|
||||
init: function(editor)
|
||||
{
|
||||
if (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE)
|
||||
return;
|
||||
|
||||
var plain = CKEDITOR.plugins.plain;
|
||||
editor.addMode('plain', function(callback) {
|
||||
|
||||
var
|
||||
contentsSpace = editor.ui.space('contents'),
|
||||
textarea = contentsSpace.getDocument().createElement('textarea')
|
||||
;
|
||||
|
||||
textarea.setStyles(
|
||||
CKEDITOR.tools.extend({
|
||||
width: CKEDITOR.env.ie7Compat ? '99%' : '100%',
|
||||
height: '100%',
|
||||
resize: 'none',
|
||||
outline: 'none',
|
||||
'text-align': 'left'
|
||||
},
|
||||
CKEDITOR.tools.cssVendorPrefix('tab-size', 4)))
|
||||
;
|
||||
|
||||
textarea.setAttribute('dir', 'ltr');
|
||||
textarea.addClass('cke_plain');
|
||||
|
||||
contentsSpace.append(textarea);
|
||||
|
||||
var editable = editor.editable(new plainEditable(editor, textarea));
|
||||
|
||||
editable.setData(editor.getData(1));
|
||||
editor.__plain = editable;
|
||||
|
||||
// Having to make <textarea> fixed sized to conquer the following bugs:
|
||||
// 1. The textarea height/width='100%' doesn't constraint to the 'td' in IE6/7.
|
||||
// 2. Unexpected vertical-scrolling behavior happens whenever focus is moving out of editor
|
||||
// if text content within it has overflowed. (#4762)
|
||||
if (CKEDITOR.env.ie) {
|
||||
editable.attachListener(editor, 'resize', onResize, editable);
|
||||
editable.attachListener(CKEDITOR.document.getWindow(), 'resize', onResize, editable);
|
||||
CKEDITOR.tools.setTimeout(onResize, 0, editable);
|
||||
}
|
||||
|
||||
editor.fire('ariaWidget', this);
|
||||
callback();
|
||||
});
|
||||
|
||||
editor.addCommand('plain', plain.commands.plain);
|
||||
|
||||
if (editor.ui.addButton) {
|
||||
editor.ui.addButton('plain', {
|
||||
label: '',
|
||||
command: 'plain',
|
||||
toolbar: 'spec,10'
|
||||
});
|
||||
}
|
||||
|
||||
editor.on('mode', function() {
|
||||
editor.getCommand('plain').setState(editor.mode === 'plain' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF);
|
||||
editor.editable().addClass('cke_enable_context_menu');
|
||||
});
|
||||
|
||||
function onResize() {
|
||||
this.hide();
|
||||
this.setStyle('height', this.getParent().$.clientHeight + 'px');
|
||||
this.setStyle('width', this.getParent().$.clientWidth + 'px');
|
||||
this.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var plainEditable = CKEDITOR.tools.createClass({
|
||||
base: CKEDITOR.editable,
|
||||
proto: {
|
||||
setData: function(data) {
|
||||
this.setValue(window.rainloop_Utils_htmlToPlain ?
|
||||
window.rainloop_Utils_htmlToPlain(data) : simpleHtmlToPlain(data));
|
||||
|
||||
this.editor.fire('dataReady');
|
||||
},
|
||||
setRawData: function(data) {
|
||||
this.setValue(data);
|
||||
this.editor.fire('dataReady');
|
||||
},
|
||||
getData: function() {
|
||||
return window.rainloop_Utils_plainToHtml ?
|
||||
window.rainloop_Utils_plainToHtml(this.getValue(), true) : simplePlainToHtml(this.getValue());
|
||||
},
|
||||
getRawData: function() {
|
||||
return this.getValue();
|
||||
},
|
||||
insertHtml: function() {},
|
||||
insertElement: function() {},
|
||||
insertText: function() {},
|
||||
setReadOnly: function( isReadOnly ) {
|
||||
this[(isReadOnly ? 'set' : 'remove') + 'Attribute' ]('readOnly', 'readonly');
|
||||
},
|
||||
detach: function() {
|
||||
plainEditable.baseProto.detach.call( this );
|
||||
this.clearCustomData();
|
||||
this.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
CKEDITOR.plugins.plain = {
|
||||
commands: {
|
||||
plain: {
|
||||
modes: {
|
||||
wysiwyg: 1, plain: 1
|
||||
},
|
||||
editorFocus: false,
|
||||
readOnly: 1,
|
||||
exec: function(editor) {
|
||||
if (editor.mode === 'wysiwyg') {
|
||||
editor.fire('saveSnapshot');
|
||||
}
|
||||
|
||||
editor.getCommand('plain').setState(CKEDITOR.TRISTATE_DISABLED);
|
||||
editor.setMode(editor.mode === 'plain' ? 'wysiwyg' : 'plain');
|
||||
},
|
||||
canUndo: false
|
||||
}
|
||||
}
|
||||
};
|
||||
21
vendors/ckeditor/plugins/table/dialogs/table.js
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
(function(){function r(a){for(var e=0,l=0,k=0,m,g=a.$.rows.length;k<g;k++){m=a.$.rows[k];for(var d=e=0,c,b=m.cells.length;d<b;d++)c=m.cells[d],e+=c.colSpan;e>l&&(l=e)}return l}function o(a){return function(){var e=this.getValue(),e=!!(CKEDITOR.dialog.validate.integer()(e)&&0<e);e||(alert(a),this.select());return e}}function n(a,e){var l=function(g){return new CKEDITOR.dom.element(g,a.document)},n=a.editable(),m=a.plugins.dialogadvtab;return{title:a.lang.table.title,minWidth:310,minHeight:CKEDITOR.env.ie?
|
||||
310:280,onLoad:function(){var g=this,a=g.getContentElement("advanced","advStyles");if(a)a.on("change",function(){var a=this.getStyle("width",""),b=g.getContentElement("info","txtWidth");b&&b.setValue(a,!0);a=this.getStyle("height","");(b=g.getContentElement("info","txtHeight"))&&b.setValue(a,!0)})},onShow:function(){var g=a.getSelection(),d=g.getRanges(),c,b=this.getContentElement("info","txtRows"),h=this.getContentElement("info","txtCols"),p=this.getContentElement("info","txtWidth"),f=this.getContentElement("info",
|
||||
"txtHeight");"tableProperties"==e&&((g=g.getSelectedElement())&&g.is("table")?c=g:0<d.length&&(CKEDITOR.env.webkit&&d[0].shrink(CKEDITOR.NODE_ELEMENT),c=a.elementPath(d[0].getCommonAncestor(!0)).contains("table",1)),this._.selectedElement=c);c?(this.setupContent(c),b&&b.disable(),h&&h.disable()):(b&&b.enable(),h&&h.enable());p&&p.onChange();f&&f.onChange()},onOk:function(){var g=a.getSelection(),d=this._.selectedElement&&g.createBookmarks(),c=this._.selectedElement||l("table"),b={};this.commitContent(b,
|
||||
c);if(b.info){b=b.info;if(!this._.selectedElement)for(var h=c.append(l("tbody")),e=parseInt(b.txtRows,10)||0,f=parseInt(b.txtCols,10)||0,i=0;i<e;i++)for(var j=h.append(l("tr")),k=0;k<f;k++)j.append(l("td")).appendBogus();e=b.selHeaders;if(!c.$.tHead&&("row"==e||"both"==e)){j=new CKEDITOR.dom.element(c.$.createTHead());h=c.getElementsByTag("tbody").getItem(0);h=h.getElementsByTag("tr").getItem(0);for(i=0;i<h.getChildCount();i++)f=h.getChild(i),f.type==CKEDITOR.NODE_ELEMENT&&!f.data("cke-bookmark")&&
|
||||
(f.renameNode("th"),f.setAttribute("scope","col"));j.append(h.remove())}if(null!==c.$.tHead&&!("row"==e||"both"==e)){j=new CKEDITOR.dom.element(c.$.tHead);h=c.getElementsByTag("tbody").getItem(0);for(k=h.getFirst();0<j.getChildCount();){h=j.getFirst();for(i=0;i<h.getChildCount();i++)f=h.getChild(i),f.type==CKEDITOR.NODE_ELEMENT&&(f.renameNode("td"),f.removeAttribute("scope"));h.insertBefore(k)}j.remove()}if(!this.hasColumnHeaders&&("col"==e||"both"==e))for(j=0;j<c.$.rows.length;j++)f=new CKEDITOR.dom.element(c.$.rows[j].cells[0]),
|
||||
f.renameNode("th"),f.setAttribute("scope","row");if(this.hasColumnHeaders&&!("col"==e||"both"==e))for(i=0;i<c.$.rows.length;i++)j=new CKEDITOR.dom.element(c.$.rows[i]),"tbody"==j.getParent().getName()&&(f=new CKEDITOR.dom.element(j.$.cells[0]),f.renameNode("td"),f.removeAttribute("scope"));b.txtHeight?c.setStyle("height",b.txtHeight):c.removeStyle("height");b.txtWidth?c.setStyle("width",b.txtWidth):c.removeStyle("width");c.getAttribute("style")||c.removeAttribute("style")}if(this._.selectedElement)try{g.selectBookmarks(d)}catch(m){}else a.insertElement(c),
|
||||
setTimeout(function(){var g=new CKEDITOR.dom.element(c.$.rows[0].cells[0]),b=a.createRange();b.moveToPosition(g,CKEDITOR.POSITION_AFTER_START);b.select()},0)},contents:[{id:"info",label:a.lang.table.title,elements:[{type:"hbox",widths:[null,null],styles:["vertical-align:top"],children:[{type:"vbox",padding:0,children:[{type:"text",id:"txtRows","default":3,label:a.lang.table.rows,required:!0,controlStyle:"width:5em",validate:o(a.lang.table.invalidRows),setup:function(a){this.setValue(a.$.rows.length)},
|
||||
commit:k},{type:"text",id:"txtCols","default":2,label:a.lang.table.columns,required:!0,controlStyle:"width:5em",validate:o(a.lang.table.invalidCols),setup:function(a){this.setValue(r(a))},commit:k},{type:"html",html:" "},{type:"select",id:"selHeaders",requiredContent:"th","default":"",label:a.lang.table.headers,items:[[a.lang.table.headersNone,""],[a.lang.table.headersRow,"row"],[a.lang.table.headersColumn,"col"],[a.lang.table.headersBoth,"both"]],setup:function(a){var d=this.getDialog();d.hasColumnHeaders=
|
||||
!0;for(var c=0;c<a.$.rows.length;c++){var b=a.$.rows[c].cells[0];if(b&&"th"!=b.nodeName.toLowerCase()){d.hasColumnHeaders=!1;break}}null!==a.$.tHead?this.setValue(d.hasColumnHeaders?"both":"row"):this.setValue(d.hasColumnHeaders?"col":"")},commit:k},{type:"text",id:"txtBorder",requiredContent:"table[border]","default":a.filter.check("table[border]")?1:0,label:a.lang.table.border,controlStyle:"width:3em",validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidBorder),setup:function(a){this.setValue(a.getAttribute("border")||
|
||||
"")},commit:function(a,d){this.getValue()?d.setAttribute("border",this.getValue()):d.removeAttribute("border")}},{id:"cmbAlign",type:"select",requiredContent:"table[align]","default":"",label:a.lang.common.align,items:[[a.lang.common.notSet,""],[a.lang.common.alignLeft,"left"],[a.lang.common.alignCenter,"center"],[a.lang.common.alignRight,"right"]],setup:function(a){this.setValue(a.getAttribute("align")||"")},commit:function(a,d){this.getValue()?d.setAttribute("align",this.getValue()):d.removeAttribute("align")}}]},
|
||||
{type:"vbox",padding:0,children:[{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtWidth",requiredContent:"table{width}",controlStyle:"width:5em",label:a.lang.common.width,title:a.lang.common.cssLengthTooltip,"default":a.filter.check("table{width}")?500>n.getSize("width")?"100%":500:0,getValue:q,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",a.lang.common.width)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");a&&
|
||||
a.updateStyle("width",this.getValue())},setup:function(a){this.setValue(a.getStyle("width"))},commit:k}]},{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtHeight",requiredContent:"table{height}",controlStyle:"width:5em",label:a.lang.common.height,title:a.lang.common.cssLengthTooltip,"default":"",getValue:q,validate:CKEDITOR.dialog.validate.cssLength(a.lang.common.invalidCssLength.replace("%1",a.lang.common.height)),onChange:function(){var a=this.getDialog().getContentElement("advanced","advStyles");
|
||||
a&&a.updateStyle("height",this.getValue())},setup:function(a){(a=a.getStyle("height"))&&this.setValue(a)},commit:k}]},{type:"html",html:" "},{type:"text",id:"txtCellSpace",requiredContent:"table[cellspacing]",controlStyle:"width:3em",label:a.lang.table.cellSpace,"default":a.filter.check("table[cellspacing]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellSpacing),setup:function(a){this.setValue(a.getAttribute("cellSpacing")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellSpacing",
|
||||
this.getValue()):d.removeAttribute("cellSpacing")}},{type:"text",id:"txtCellPad",requiredContent:"table[cellpadding]",controlStyle:"width:3em",label:a.lang.table.cellPad,"default":a.filter.check("table[cellpadding]")?1:0,validate:CKEDITOR.dialog.validate.number(a.lang.table.invalidCellPadding),setup:function(a){this.setValue(a.getAttribute("cellPadding")||"")},commit:function(a,d){this.getValue()?d.setAttribute("cellPadding",this.getValue()):d.removeAttribute("cellPadding")}}]}]},{type:"html",align:"right",
|
||||
html:""},{type:"vbox",padding:0,children:[{type:"text",id:"txtCaption",requiredContent:"caption",label:a.lang.table.caption,setup:function(a){this.enable();a=a.getElementsByTag("caption");if(0<a.count()){var a=a.getItem(0),d=a.getFirst(CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT));d&&!d.equals(a.getBogus())?(this.disable(),this.setValue(a.getText())):(a=CKEDITOR.tools.trim(a.getText()),this.setValue(a))}},commit:function(e,d){if(this.isEnabled()){var c=this.getValue(),b=d.getElementsByTag("caption");
|
||||
if(c)0<b.count()?(b=b.getItem(0),b.setHtml("")):(b=new CKEDITOR.dom.element("caption",a.document),d.getChildCount()?b.insertBefore(d.getFirst()):b.appendTo(d)),b.append(new CKEDITOR.dom.text(c,a.document));else if(0<b.count())for(c=b.count()-1;0<=c;c--)b.getItem(c).remove()}}},{type:"text",id:"txtSummary",requiredContent:"table[summary]",label:a.lang.table.summary,setup:function(a){this.setValue(a.getAttribute("summary")||"")},commit:function(a,d){this.getValue()?d.setAttribute("summary",this.getValue()):
|
||||
d.removeAttribute("summary")}}]}]},m&&m.createAdvancedTab(a,null,"table")]}}var q=CKEDITOR.tools.cssLength,k=function(a){var e=this.id;a.info||(a.info={});a.info[e]=this.getValue()};CKEDITOR.dialog.add("table",function(a){return n(a,"table")});CKEDITOR.dialog.add("tableProperties",function(a){return n(a,"tableProperties")})})();
|
||||
17
vendors/ckeditor/plugins/tabletools/dialogs/tableCell.js
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add("cellProperties",function(g){function d(a){return function(b){for(var c=a(b[0]),d=1;d<b.length;d++)if(a(b[d])!==c){c=null;break}"undefined"!=typeof c&&(this.setValue(c),CKEDITOR.env.gecko&&("select"==this.type&&!c)&&(this.getInputElement().$.selectedIndex=-1))}}function j(a){if(a=l.exec(a.getStyle("width")||a.getAttribute("width")))return a[2]}var h=g.lang.table,c=h.cell,e=g.lang.common,i=CKEDITOR.dialog.validate,l=/^(\d+(?:\.\d+)?)(px|%)$/,f={type:"html",html:" "},m="rtl"==
|
||||
g.lang.dir,k=g.plugins.colordialog;return{title:c.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?450:410,minHeight:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?230:220,contents:[{id:"info",label:c.title,accessKey:"I",elements:[{type:"hbox",widths:["40%","5%","40%"],children:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["70%","30%"],children:[{type:"text",id:"width",width:"100px",label:e.width,validate:i.number(c.invalidWidth),onLoad:function(){var a=this.getDialog().getContentElement("info",
|
||||
"widthType").getElement(),b=this.getInputElement(),c=b.getAttribute("aria-labelledby");b.setAttribute("aria-labelledby",[c,a.$.id].join(" "))},setup:d(function(a){var b=parseInt(a.getAttribute("width"),10),a=parseInt(a.getStyle("width"),10);return!isNaN(a)?a:!isNaN(b)?b:""}),commit:function(a){var b=parseInt(this.getValue(),10),c=this.getDialog().getValueOf("info","widthType")||j(a);isNaN(b)?a.removeStyle("width"):a.setStyle("width",b+c);a.removeAttribute("width")},"default":""},{type:"select",id:"widthType",
|
||||
label:g.lang.table.widthUnit,labelStyle:"visibility:hidden","default":"px",items:[[h.widthPx,"px"],[h.widthPc,"%"]],setup:d(j)}]},{type:"hbox",widths:["70%","30%"],children:[{type:"text",id:"height",label:e.height,width:"100px","default":"",validate:i.number(c.invalidHeight),onLoad:function(){var a=this.getDialog().getContentElement("info","htmlHeightType").getElement(),b=this.getInputElement(),c=b.getAttribute("aria-labelledby");b.setAttribute("aria-labelledby",[c,a.$.id].join(" "))},setup:d(function(a){var b=
|
||||
parseInt(a.getAttribute("height"),10),a=parseInt(a.getStyle("height"),10);return!isNaN(a)?a:!isNaN(b)?b:""}),commit:function(a){var b=parseInt(this.getValue(),10);isNaN(b)?a.removeStyle("height"):a.setStyle("height",CKEDITOR.tools.cssLength(b));a.removeAttribute("height")}},{id:"htmlHeightType",type:"html",html:"<br />"+h.widthPx}]},f,{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:d(function(a){var b=a.getAttribute("noWrap");if("nowrap"==a.getStyle("white-space")||
|
||||
b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},f,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[e.notSet,""],[e.alignLeft,"left"],[e.alignCenter,"center"],[e.alignRight,"right"],[e.alignJustify,"justify"]],setup:d(function(a){var b=a.getAttribute("align");return a.getStyle("text-align")||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");
|
||||
a.removeAttribute("align")}},{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[e.notSet,""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[c.alignBaseline,"baseline"]],setup:d(function(a){var b=a.getAttribute("vAlign"),a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]},
|
||||
f,{type:"vbox",padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]],setup:d(function(a){return a.getName()}),commit:function(a){a.renameNode(this.getValue())}},f,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:i.integer(c.invalidRowSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):
|
||||
a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:i.integer(c.invalidColSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},f,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:d(function(a){var b=a.getAttribute("bgColor");
|
||||
return a.getStyle("background-color")||b}),commit:function(a){this.getValue()?a.setStyle("background-color",this.getValue()):a.removeStyle("background-color");a.removeAttribute("bgColor")}},k?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:f]},f,
|
||||
{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:d(function(a){var b=a.getAttribute("borderColor");return a.getStyle("border-color")||b}),commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},k?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(m?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align",
|
||||
"bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","borderColor").setValue(a);this.focus()},this)}}:f]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells)},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.cells,d=0;d<c.length;d++)this.commitContent(c[d]);this._.editor.forceNextSelectionCheck();a.selectBookmarks(b);this._.editor.selectionChange()},
|
||||
onLoad:function(){var a={};this.foreach(function(b){b.setup&&b.commit&&(b.setup=CKEDITOR.tools.override(b.setup,function(c){return function(){c.apply(this,arguments);a[b.id]=b.getValue()}}),b.commit=CKEDITOR.tools.override(b.commit,function(c){return function(){a[b.id]!==b.getValue()&&c.apply(this,arguments)}}))})}}});
|
||||