diff options
Diffstat (limited to 'plugins/bidi')
67 files changed, 819 insertions, 0 deletions
diff --git a/plugins/bidi/icons/bidiltr.png b/plugins/bidi/icons/bidiltr.png Binary files differnew file mode 100644 index 0000000..1b89022 --- /dev/null +++ b/plugins/bidi/icons/bidiltr.png diff --git a/plugins/bidi/icons/bidirtl.png b/plugins/bidi/icons/bidirtl.png Binary files differnew file mode 100644 index 0000000..27dea25 --- /dev/null +++ b/plugins/bidi/icons/bidirtl.png diff --git a/plugins/bidi/lang/af.js b/plugins/bidi/lang/af.js new file mode 100644 index 0000000..175fea3 --- /dev/null +++ b/plugins/bidi/lang/af.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'af', {
+ ltr: 'Skryfrigting van links na regs',
+ rtl: 'Skryfrigting van regs na links'
+});
diff --git a/plugins/bidi/lang/ar.js b/plugins/bidi/lang/ar.js new file mode 100644 index 0000000..9bb89c2 --- /dev/null +++ b/plugins/bidi/lang/ar.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'ar', {
+ ltr: 'Text direction from left to right', // MISSING
+ rtl: 'Text direction from right to left' // MISSING
+});
diff --git a/plugins/bidi/lang/bg.js b/plugins/bidi/lang/bg.js new file mode 100644 index 0000000..85ea0ec --- /dev/null +++ b/plugins/bidi/lang/bg.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'bg', {
+ ltr: 'Посока на текста от ляво на дясно',
+ rtl: 'Посока на текста от дясно на ляво'
+});
diff --git a/plugins/bidi/lang/bn.js b/plugins/bidi/lang/bn.js new file mode 100644 index 0000000..62d8733 --- /dev/null +++ b/plugins/bidi/lang/bn.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/bs.js b/plugins/bidi/lang/bs.js new file mode 100644 index 0000000..92e2a06 --- /dev/null +++ b/plugins/bidi/lang/bs.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/ca.js b/plugins/bidi/lang/ca.js new file mode 100644 index 0000000..f657f40 --- /dev/null +++ b/plugins/bidi/lang/ca.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/cs.js b/plugins/bidi/lang/cs.js new file mode 100644 index 0000000..7811166 --- /dev/null +++ b/plugins/bidi/lang/cs.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'cs', {
+ ltr: 'Směr textu zleva doprava',
+ rtl: 'Směr textu zprava doleva'
+});
diff --git a/plugins/bidi/lang/cy.js b/plugins/bidi/lang/cy.js new file mode 100644 index 0000000..85554ec --- /dev/null +++ b/plugins/bidi/lang/cy.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/da.js b/plugins/bidi/lang/da.js new file mode 100644 index 0000000..349523b --- /dev/null +++ b/plugins/bidi/lang/da.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'da', {
+ ltr: 'Tekstretning fra venstre til højre',
+ rtl: 'Tekstretning fra højre til venstre'
+});
diff --git a/plugins/bidi/lang/de.js b/plugins/bidi/lang/de.js new file mode 100644 index 0000000..8b19453 --- /dev/null +++ b/plugins/bidi/lang/de.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'de', {
+ ltr: 'Leserichtung von Links nach Rechts',
+ rtl: 'Leserichtung von Rechts nach Links'
+});
diff --git a/plugins/bidi/lang/el.js b/plugins/bidi/lang/el.js new file mode 100644 index 0000000..91eb43d --- /dev/null +++ b/plugins/bidi/lang/el.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'el', {
+ ltr: 'Διεύθυνση κειμένου από αριστερά στα δεξιά',
+ rtl: 'Διεύθυνση κειμένου από δεξιά στα αριστερά'
+});
diff --git a/plugins/bidi/lang/en-au.js b/plugins/bidi/lang/en-au.js new file mode 100644 index 0000000..22e4dc0 --- /dev/null +++ b/plugins/bidi/lang/en-au.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/en-ca.js b/plugins/bidi/lang/en-ca.js new file mode 100644 index 0000000..abe76d1 --- /dev/null +++ b/plugins/bidi/lang/en-ca.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/en-gb.js b/plugins/bidi/lang/en-gb.js new file mode 100644 index 0000000..82894e5 --- /dev/null +++ b/plugins/bidi/lang/en-gb.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/en.js b/plugins/bidi/lang/en.js new file mode 100644 index 0000000..a49b65c --- /dev/null +++ b/plugins/bidi/lang/en.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'en', {
+ ltr: 'Text direction from left to right',
+ rtl: 'Text direction from right to left'
+});
diff --git a/plugins/bidi/lang/eo.js b/plugins/bidi/lang/eo.js new file mode 100644 index 0000000..3096cc1 --- /dev/null +++ b/plugins/bidi/lang/eo.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'eo', {
+ ltr: 'Tekstdirekto de maldekstre dekstren',
+ rtl: 'Tekstdirekto de dekstre maldekstren'
+});
diff --git a/plugins/bidi/lang/es.js b/plugins/bidi/lang/es.js new file mode 100644 index 0000000..af9ea7f --- /dev/null +++ b/plugins/bidi/lang/es.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/et.js b/plugins/bidi/lang/et.js new file mode 100644 index 0000000..27e5029 --- /dev/null +++ b/plugins/bidi/lang/et.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'et', {
+ ltr: 'Teksti suund vasakult paremale',
+ rtl: 'Teksti suund paremalt vasakule'
+});
diff --git a/plugins/bidi/lang/eu.js b/plugins/bidi/lang/eu.js new file mode 100644 index 0000000..1860b29 --- /dev/null +++ b/plugins/bidi/lang/eu.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'eu', {
+ ltr: 'Testuaren norantza ezkerretik eskuinera',
+ rtl: 'Testuaren norantza eskuinetik ezkerrera'
+});
diff --git a/plugins/bidi/lang/fa.js b/plugins/bidi/lang/fa.js new file mode 100644 index 0000000..67a27f6 --- /dev/null +++ b/plugins/bidi/lang/fa.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'fa', {
+ ltr: 'نوشتار متن از چپ به راست',
+ rtl: 'نوشتار متن از راست به چپ'
+});
diff --git a/plugins/bidi/lang/fi.js b/plugins/bidi/lang/fi.js new file mode 100644 index 0000000..a77f5d4 --- /dev/null +++ b/plugins/bidi/lang/fi.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'fi', {
+ ltr: 'Tekstin suunta vasemmalta oikealle',
+ rtl: 'Tekstin suunta oikealta vasemmalle'
+});
diff --git a/plugins/bidi/lang/fo.js b/plugins/bidi/lang/fo.js new file mode 100644 index 0000000..deb0344 --- /dev/null +++ b/plugins/bidi/lang/fo.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/fr-ca.js b/plugins/bidi/lang/fr-ca.js new file mode 100644 index 0000000..dcfda02 --- /dev/null +++ b/plugins/bidi/lang/fr-ca.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/fr.js b/plugins/bidi/lang/fr.js new file mode 100644 index 0000000..13250de --- /dev/null +++ b/plugins/bidi/lang/fr.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/gl.js b/plugins/bidi/lang/gl.js new file mode 100644 index 0000000..7121ae3 --- /dev/null +++ b/plugins/bidi/lang/gl.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/gu.js b/plugins/bidi/lang/gu.js new file mode 100644 index 0000000..8ea4030 --- /dev/null +++ b/plugins/bidi/lang/gu.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'gu', {
+ ltr: 'ટેક્ષ્ત્ ની દિશા ડાબે થી જમણે',
+ rtl: 'ટેક્ષ્ત્ ની દિશા જમણે થી ડાબે'
+});
diff --git a/plugins/bidi/lang/he.js b/plugins/bidi/lang/he.js new file mode 100644 index 0000000..e5de64c --- /dev/null +++ b/plugins/bidi/lang/he.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'he', {
+ ltr: 'כיוון טקסט משמאל לימין (LTR)',
+ rtl: 'כיוון טקסט מימין לשמאל (RTL)'
+});
diff --git a/plugins/bidi/lang/hi.js b/plugins/bidi/lang/hi.js new file mode 100644 index 0000000..78934f0 --- /dev/null +++ b/plugins/bidi/lang/hi.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/hr.js b/plugins/bidi/lang/hr.js new file mode 100644 index 0000000..2b1a90b --- /dev/null +++ b/plugins/bidi/lang/hr.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'hr', {
+ ltr: 'Smjer teksta s lijeva na desno',
+ rtl: 'Smjer teksta s desna na lijevo'
+});
diff --git a/plugins/bidi/lang/hu.js b/plugins/bidi/lang/hu.js new file mode 100644 index 0000000..ab251b5 --- /dev/null +++ b/plugins/bidi/lang/hu.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/is.js b/plugins/bidi/lang/is.js new file mode 100644 index 0000000..b1979ab --- /dev/null +++ b/plugins/bidi/lang/is.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/it.js b/plugins/bidi/lang/it.js new file mode 100644 index 0000000..8a38f11 --- /dev/null +++ b/plugins/bidi/lang/it.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/ja.js b/plugins/bidi/lang/ja.js new file mode 100644 index 0000000..570faa1 --- /dev/null +++ b/plugins/bidi/lang/ja.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'ja', {
+ ltr: 'テキストの向き : 左から右へ',
+ rtl: 'テキストの向き : 右から左へ'
+});
diff --git a/plugins/bidi/lang/ka.js b/plugins/bidi/lang/ka.js new file mode 100644 index 0000000..3696483 --- /dev/null +++ b/plugins/bidi/lang/ka.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'ka', {
+ ltr: 'ტექსტის მიმართულება მარცხნიდან მარჯვნივ',
+ rtl: 'ტექსტის მიმართულება მარჯვნიდან მარცხნივ'
+});
diff --git a/plugins/bidi/lang/km.js b/plugins/bidi/lang/km.js new file mode 100644 index 0000000..510c2c9 --- /dev/null +++ b/plugins/bidi/lang/km.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'km', {
+ ltr: 'Text direction from left to right', // MISSING
+ rtl: 'Text direction from right to left' // MISSING
+});
diff --git a/plugins/bidi/lang/ko.js b/plugins/bidi/lang/ko.js new file mode 100644 index 0000000..1a5ca3e --- /dev/null +++ b/plugins/bidi/lang/ko.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'ko', {
+ ltr: 'Text direction from left to right', // MISSING
+ rtl: 'Text direction from right to left' // MISSING
+});
diff --git a/plugins/bidi/lang/ku.js b/plugins/bidi/lang/ku.js new file mode 100644 index 0000000..52d2a4c --- /dev/null +++ b/plugins/bidi/lang/ku.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'ku', {
+ ltr: 'ئاراستەی نووسە لە چەپ بۆ ڕاست',
+ rtl: 'ئاراستەی نووسە لە ڕاست بۆ چەپ'
+});
diff --git a/plugins/bidi/lang/lt.js b/plugins/bidi/lang/lt.js new file mode 100644 index 0000000..b765dc7 --- /dev/null +++ b/plugins/bidi/lang/lt.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'lt', {
+ ltr: 'Tekstas iš kairės į dešinę',
+ rtl: 'Tekstas iš dešinės į kairę'
+});
diff --git a/plugins/bidi/lang/lv.js b/plugins/bidi/lang/lv.js new file mode 100644 index 0000000..736d225 --- /dev/null +++ b/plugins/bidi/lang/lv.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/mk.js b/plugins/bidi/lang/mk.js new file mode 100644 index 0000000..298c377 --- /dev/null +++ b/plugins/bidi/lang/mk.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/mn.js b/plugins/bidi/lang/mn.js new file mode 100644 index 0000000..271a4d5 --- /dev/null +++ b/plugins/bidi/lang/mn.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'mn', {
+ ltr: 'Зүүнээс баруун тийш бичлэг',
+ rtl: 'Баруунаас зүүн тийш бичлэг'
+});
diff --git a/plugins/bidi/lang/ms.js b/plugins/bidi/lang/ms.js new file mode 100644 index 0000000..1c4eefe --- /dev/null +++ b/plugins/bidi/lang/ms.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/nb.js b/plugins/bidi/lang/nb.js new file mode 100644 index 0000000..d187dcb --- /dev/null +++ b/plugins/bidi/lang/nb.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'nb', {
+ ltr: 'Tekstretning fra venstre til høyre',
+ rtl: 'Tekstretning fra høyre til venstre'
+});
diff --git a/plugins/bidi/lang/nl.js b/plugins/bidi/lang/nl.js new file mode 100644 index 0000000..da314d3 --- /dev/null +++ b/plugins/bidi/lang/nl.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'nl', {
+ ltr: 'Schrijfrichting van links naar rechts',
+ rtl: 'Schrijfrichting van rechts naar links'
+});
diff --git a/plugins/bidi/lang/no.js b/plugins/bidi/lang/no.js new file mode 100644 index 0000000..da11d01 --- /dev/null +++ b/plugins/bidi/lang/no.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'no', {
+ ltr: 'Tekstretning fra venstre til høyre',
+ rtl: 'Tekstretning fra høyre til venstre'
+});
diff --git a/plugins/bidi/lang/pl.js b/plugins/bidi/lang/pl.js new file mode 100644 index 0000000..c40fdcc --- /dev/null +++ b/plugins/bidi/lang/pl.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/pt-br.js b/plugins/bidi/lang/pt-br.js new file mode 100644 index 0000000..d5f04aa --- /dev/null +++ b/plugins/bidi/lang/pt-br.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/pt.js b/plugins/bidi/lang/pt.js new file mode 100644 index 0000000..d4bc900 --- /dev/null +++ b/plugins/bidi/lang/pt.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/ro.js b/plugins/bidi/lang/ro.js new file mode 100644 index 0000000..ebada41 --- /dev/null +++ b/plugins/bidi/lang/ro.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/ru.js b/plugins/bidi/lang/ru.js new file mode 100644 index 0000000..84b005a --- /dev/null +++ b/plugins/bidi/lang/ru.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'ru', {
+ ltr: 'Направление текста слева направо',
+ rtl: 'Направление текста справа налево'
+});
diff --git a/plugins/bidi/lang/si.js b/plugins/bidi/lang/si.js new file mode 100644 index 0000000..016bfda --- /dev/null +++ b/plugins/bidi/lang/si.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'si', {
+ ltr: 'වගන්ති දිශාව වමේ සිට දකුණට',
+ rtl: 'වගන්ති දිශාව දකුණේ සිට වමට'
+});
diff --git a/plugins/bidi/lang/sk.js b/plugins/bidi/lang/sk.js new file mode 100644 index 0000000..9c0e6a3 --- /dev/null +++ b/plugins/bidi/lang/sk.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'sk', {
+ ltr: 'Smer textu zľava doprava',
+ rtl: 'Smer textu sprava doľava'
+});
diff --git a/plugins/bidi/lang/sl.js b/plugins/bidi/lang/sl.js new file mode 100644 index 0000000..b27255c --- /dev/null +++ b/plugins/bidi/lang/sl.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'sl', {
+ ltr: 'Text direction from left to right', // MISSING
+ rtl: 'Text direction from right to left' // MISSING
+});
diff --git a/plugins/bidi/lang/sq.js b/plugins/bidi/lang/sq.js new file mode 100644 index 0000000..548f545 --- /dev/null +++ b/plugins/bidi/lang/sq.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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ë'
+});
diff --git a/plugins/bidi/lang/sr-latn.js b/plugins/bidi/lang/sr-latn.js new file mode 100644 index 0000000..4cdb676 --- /dev/null +++ b/plugins/bidi/lang/sr-latn.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/sr.js b/plugins/bidi/lang/sr.js new file mode 100644 index 0000000..7cd9a85 --- /dev/null +++ b/plugins/bidi/lang/sr.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/sv.js b/plugins/bidi/lang/sv.js new file mode 100644 index 0000000..3ac8612 --- /dev/null +++ b/plugins/bidi/lang/sv.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/th.js b/plugins/bidi/lang/th.js new file mode 100644 index 0000000..f4ab9de --- /dev/null +++ b/plugins/bidi/lang/th.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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
+});
diff --git a/plugins/bidi/lang/tr.js b/plugins/bidi/lang/tr.js new file mode 100644 index 0000000..523ff50 --- /dev/null +++ b/plugins/bidi/lang/tr.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'tr', {
+ ltr: 'Metin yönü soldan sağa',
+ rtl: 'Metin yönü sağdan sola'
+});
diff --git a/plugins/bidi/lang/ug.js b/plugins/bidi/lang/ug.js new file mode 100644 index 0000000..8605e00 --- /dev/null +++ b/plugins/bidi/lang/ug.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'ug', {
+ ltr: 'تېكىست يۆنىلىشى سولدىن ئوڭغا',
+ rtl: 'تېكىست يۆنىلىشى ئوڭدىن سولغا'
+});
diff --git a/plugins/bidi/lang/uk.js b/plugins/bidi/lang/uk.js new file mode 100644 index 0000000..7b0e82f --- /dev/null +++ b/plugins/bidi/lang/uk.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'uk', {
+ ltr: 'Напрямок тексту зліва направо',
+ rtl: 'Напрямок тексту справа наліво'
+});
diff --git a/plugins/bidi/lang/vi.js b/plugins/bidi/lang/vi.js new file mode 100644 index 0000000..715403e --- /dev/null +++ b/plugins/bidi/lang/vi.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html 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'
+});
diff --git a/plugins/bidi/lang/zh-cn.js b/plugins/bidi/lang/zh-cn.js new file mode 100644 index 0000000..98990dc --- /dev/null +++ b/plugins/bidi/lang/zh-cn.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'zh-cn', {
+ ltr: '文字方向为从左至右',
+ rtl: '文字方向为从右至左'
+});
diff --git a/plugins/bidi/lang/zh.js b/plugins/bidi/lang/zh.js new file mode 100644 index 0000000..6b0f703 --- /dev/null +++ b/plugins/bidi/lang/zh.js @@ -0,0 +1,8 @@ +/*
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'bidi', 'zh', {
+ ltr: 'Text direction from left to right', // MISSING
+ rtl: 'Text direction from right to left' // MISSING
+});
diff --git a/plugins/bidi/plugin.js b/plugins/bidi/plugin.js new file mode 100644 index 0000000..69aef6a --- /dev/null +++ b/plugins/bidi/plugin.js @@ -0,0 +1,307 @@ +/**
+ * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.html 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,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,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
+ icons: 'bidiltr,bidirtl', // %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;
+
+ if ( editor.ui.addToolbarGroup )
+ editor.ui.addToolbarGroup( 'bidi', 'align', 'paragraph' );
+
+ 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.
+ */
|
