summaryrefslogtreecommitdiff
path: root/plugins/indent
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/indent')
-rw-r--r--plugins/indent/icons/indent-rtl.pngbin0 -> 725 bytes
-rw-r--r--plugins/indent/icons/indent.pngbin0 -> 705 bytes
-rw-r--r--plugins/indent/icons/outdent-rtl.pngbin0 -> 703 bytes
-rw-r--r--plugins/indent/icons/outdent.pngbin0 -> 697 bytes
-rw-r--r--plugins/indent/lang/af.js8
-rw-r--r--plugins/indent/lang/ar.js8
-rw-r--r--plugins/indent/lang/bg.js8
-rw-r--r--plugins/indent/lang/bn.js8
-rw-r--r--plugins/indent/lang/bs.js8
-rw-r--r--plugins/indent/lang/ca.js8
-rw-r--r--plugins/indent/lang/cs.js8
-rw-r--r--plugins/indent/lang/cy.js8
-rw-r--r--plugins/indent/lang/da.js8
-rw-r--r--plugins/indent/lang/de.js8
-rw-r--r--plugins/indent/lang/el.js8
-rw-r--r--plugins/indent/lang/en-au.js8
-rw-r--r--plugins/indent/lang/en-ca.js8
-rw-r--r--plugins/indent/lang/en-gb.js8
-rw-r--r--plugins/indent/lang/en.js8
-rw-r--r--plugins/indent/lang/eo.js8
-rw-r--r--plugins/indent/lang/es.js8
-rw-r--r--plugins/indent/lang/et.js8
-rw-r--r--plugins/indent/lang/eu.js8
-rw-r--r--plugins/indent/lang/fa.js8
-rw-r--r--plugins/indent/lang/fi.js8
-rw-r--r--plugins/indent/lang/fo.js8
-rw-r--r--plugins/indent/lang/fr-ca.js8
-rw-r--r--plugins/indent/lang/fr.js8
-rw-r--r--plugins/indent/lang/gl.js8
-rw-r--r--plugins/indent/lang/gu.js8
-rw-r--r--plugins/indent/lang/he.js8
-rw-r--r--plugins/indent/lang/hi.js8
-rw-r--r--plugins/indent/lang/hr.js8
-rw-r--r--plugins/indent/lang/hu.js8
-rw-r--r--plugins/indent/lang/is.js8
-rw-r--r--plugins/indent/lang/it.js8
-rw-r--r--plugins/indent/lang/ja.js8
-rw-r--r--plugins/indent/lang/ka.js8
-rw-r--r--plugins/indent/lang/km.js8
-rw-r--r--plugins/indent/lang/ko.js8
-rw-r--r--plugins/indent/lang/ku.js8
-rw-r--r--plugins/indent/lang/lt.js8
-rw-r--r--plugins/indent/lang/lv.js8
-rw-r--r--plugins/indent/lang/mk.js8
-rw-r--r--plugins/indent/lang/mn.js8
-rw-r--r--plugins/indent/lang/ms.js8
-rw-r--r--plugins/indent/lang/nb.js8
-rw-r--r--plugins/indent/lang/nl.js8
-rw-r--r--plugins/indent/lang/no.js8
-rw-r--r--plugins/indent/lang/pl.js8
-rw-r--r--plugins/indent/lang/pt-br.js8
-rw-r--r--plugins/indent/lang/pt.js8
-rw-r--r--plugins/indent/lang/ro.js8
-rw-r--r--plugins/indent/lang/ru.js8
-rw-r--r--plugins/indent/lang/si.js8
-rw-r--r--plugins/indent/lang/sk.js8
-rw-r--r--plugins/indent/lang/sl.js8
-rw-r--r--plugins/indent/lang/sq.js8
-rw-r--r--plugins/indent/lang/sr-latn.js8
-rw-r--r--plugins/indent/lang/sr.js8
-rw-r--r--plugins/indent/lang/sv.js8
-rw-r--r--plugins/indent/lang/th.js8
-rw-r--r--plugins/indent/lang/tr.js8
-rw-r--r--plugins/indent/lang/ug.js8
-rw-r--r--plugins/indent/lang/uk.js8
-rw-r--r--plugins/indent/lang/vi.js8
-rw-r--r--plugins/indent/lang/zh-cn.js8
-rw-r--r--plugins/indent/lang/zh.js8
-rw-r--r--plugins/indent/plugin.js435
69 files changed, 947 insertions, 0 deletions
diff --git a/plugins/indent/icons/indent-rtl.png b/plugins/indent/icons/indent-rtl.png
new file mode 100644
index 0000000..c13b9a9
--- /dev/null
+++ b/plugins/indent/icons/indent-rtl.png
Binary files differ
diff --git a/plugins/indent/icons/indent.png b/plugins/indent/icons/indent.png
new file mode 100644
index 0000000..7156bbb
--- /dev/null
+++ b/plugins/indent/icons/indent.png
Binary files differ
diff --git a/plugins/indent/icons/outdent-rtl.png b/plugins/indent/icons/outdent-rtl.png
new file mode 100644
index 0000000..2f5071b
--- /dev/null
+++ b/plugins/indent/icons/outdent-rtl.png
Binary files differ
diff --git a/plugins/indent/icons/outdent.png b/plugins/indent/icons/outdent.png
new file mode 100644
index 0000000..e037b1f
--- /dev/null
+++ b/plugins/indent/icons/outdent.png
Binary files differ
diff --git a/plugins/indent/lang/af.js b/plugins/indent/lang/af.js
new file mode 100644
index 0000000..d50ddbb
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'af', {
+ indent: 'Vergroot inspring',
+ outdent: 'Verklein inspring'
+});
diff --git a/plugins/indent/lang/ar.js b/plugins/indent/lang/ar.js
new file mode 100644
index 0000000..069c9dc
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ar', {
+ indent: 'زيادة المسافة البادئة',
+ outdent: 'إنقاص المسافة البادئة'
+});
diff --git a/plugins/indent/lang/bg.js b/plugins/indent/lang/bg.js
new file mode 100644
index 0000000..4f6dea0
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'bg', {
+ indent: 'Увеличаване на отстъпа',
+ outdent: 'Намаляване на отстъпа'
+});
diff --git a/plugins/indent/lang/bn.js b/plugins/indent/lang/bn.js
new file mode 100644
index 0000000..2f1507b
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'bn', {
+ indent: 'ইনডেন্ট বাড়াও',
+ outdent: 'ইনডেন্ট কমাও'
+});
diff --git a/plugins/indent/lang/bs.js b/plugins/indent/lang/bs.js
new file mode 100644
index 0000000..292c4cf
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'bs', {
+ indent: 'Poveæaj uvod',
+ outdent: 'Smanji uvod'
+});
diff --git a/plugins/indent/lang/ca.js b/plugins/indent/lang/ca.js
new file mode 100644
index 0000000..5faad40
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ca', {
+ indent: 'Augmenta el sagnat',
+ outdent: 'Redueix el sagnat'
+});
diff --git a/plugins/indent/lang/cs.js b/plugins/indent/lang/cs.js
new file mode 100644
index 0000000..e08cd1f
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'cs', {
+ indent: 'Zvětšit odsazení',
+ outdent: 'Zmenšit odsazení'
+});
diff --git a/plugins/indent/lang/cy.js b/plugins/indent/lang/cy.js
new file mode 100644
index 0000000..126606b
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'cy', {
+ indent: 'Cynyddu\'r Mewnoliad',
+ outdent: 'Lleihau\'r Mewnoliad'
+});
diff --git a/plugins/indent/lang/da.js b/plugins/indent/lang/da.js
new file mode 100644
index 0000000..ddd74d2
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'da', {
+ indent: 'Forøg indrykning',
+ outdent: 'Formindsk indrykning'
+});
diff --git a/plugins/indent/lang/de.js b/plugins/indent/lang/de.js
new file mode 100644
index 0000000..3519163
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'de', {
+ indent: 'Einzug erhöhen',
+ outdent: 'Einzug verringern'
+});
diff --git a/plugins/indent/lang/el.js b/plugins/indent/lang/el.js
new file mode 100644
index 0000000..8ee0c04
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'el', {
+ indent: 'Αύξηση Εσοχής',
+ outdent: 'Μείωση Εσοχής'
+});
diff --git a/plugins/indent/lang/en-au.js b/plugins/indent/lang/en-au.js
new file mode 100644
index 0000000..ea7d130
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'en-au', {
+ indent: 'Increase Indent',
+ outdent: 'Decrease Indent'
+});
diff --git a/plugins/indent/lang/en-ca.js b/plugins/indent/lang/en-ca.js
new file mode 100644
index 0000000..7732d93
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'en-ca', {
+ indent: 'Increase Indent',
+ outdent: 'Decrease Indent'
+});
diff --git a/plugins/indent/lang/en-gb.js b/plugins/indent/lang/en-gb.js
new file mode 100644
index 0000000..1359042
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'en-gb', {
+ indent: 'Increase Indent',
+ outdent: 'Decrease Indent'
+});
diff --git a/plugins/indent/lang/en.js b/plugins/indent/lang/en.js
new file mode 100644
index 0000000..eca8168
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'en', {
+ indent: 'Increase Indent',
+ outdent: 'Decrease Indent'
+});
diff --git a/plugins/indent/lang/eo.js b/plugins/indent/lang/eo.js
new file mode 100644
index 0000000..14b3e01
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'eo', {
+ indent: 'Pligrandigi Krommarĝenon',
+ outdent: 'Malpligrandigi Krommarĝenon'
+});
diff --git a/plugins/indent/lang/es.js b/plugins/indent/lang/es.js
new file mode 100644
index 0000000..6dd1e87
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'es', {
+ indent: 'Aumentar Sangría',
+ outdent: 'Disminuir Sangría'
+});
diff --git a/plugins/indent/lang/et.js b/plugins/indent/lang/et.js
new file mode 100644
index 0000000..df8a194
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'et', {
+ indent: 'Taande suurendamine',
+ outdent: 'Taande vähendamine'
+});
diff --git a/plugins/indent/lang/eu.js b/plugins/indent/lang/eu.js
new file mode 100644
index 0000000..ea5eb92
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'eu', {
+ indent: 'Handitu Koska',
+ outdent: 'Txikitu Koska'
+});
diff --git a/plugins/indent/lang/fa.js b/plugins/indent/lang/fa.js
new file mode 100644
index 0000000..005bc7f
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'fa', {
+ indent: 'افزایش تورفتگی',
+ outdent: 'کاهش تورفتگی'
+});
diff --git a/plugins/indent/lang/fi.js b/plugins/indent/lang/fi.js
new file mode 100644
index 0000000..d7eb244
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'fi', {
+ indent: 'Suurenna sisennystä',
+ outdent: 'Pienennä sisennystä'
+});
diff --git a/plugins/indent/lang/fo.js b/plugins/indent/lang/fo.js
new file mode 100644
index 0000000..7d75791
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'fo', {
+ indent: 'Økja reglubrotarinntriv',
+ outdent: 'Minka reglubrotarinntriv'
+});
diff --git a/plugins/indent/lang/fr-ca.js b/plugins/indent/lang/fr-ca.js
new file mode 100644
index 0000000..ea99241
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'fr-ca', {
+ indent: 'Augmenter le retrait',
+ outdent: 'Diminuer le retrait'
+});
diff --git a/plugins/indent/lang/fr.js b/plugins/indent/lang/fr.js
new file mode 100644
index 0000000..a305b86
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'fr', {
+ indent: 'Augmenter le retrait (tabulation)',
+ outdent: 'Diminuer le retrait (tabulation)'
+});
diff --git a/plugins/indent/lang/gl.js b/plugins/indent/lang/gl.js
new file mode 100644
index 0000000..8b5f804
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'gl', {
+ indent: 'Aumentar a sangría',
+ outdent: 'Reducir a sangría'
+});
diff --git a/plugins/indent/lang/gu.js b/plugins/indent/lang/gu.js
new file mode 100644
index 0000000..cab3260
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'gu', {
+ indent: 'ઇન્ડેન્ટ, લીટીના આરંભમાં જગ્યા વધારવી',
+ outdent: 'ઇન્ડેન્ટ લીટીના આરંભમાં જગ્યા ઘટાડવી'
+});
diff --git a/plugins/indent/lang/he.js b/plugins/indent/lang/he.js
new file mode 100644
index 0000000..a12e33b
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'he', {
+ indent: 'הגדלת הזחה',
+ outdent: 'הקטנת הזחה'
+});
diff --git a/plugins/indent/lang/hi.js b/plugins/indent/lang/hi.js
new file mode 100644
index 0000000..2dd6174
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'hi', {
+ indent: 'इन्डॅन्ट बढ़ायें',
+ outdent: 'इन्डॅन्ट कम करें'
+});
diff --git a/plugins/indent/lang/hr.js b/plugins/indent/lang/hr.js
new file mode 100644
index 0000000..46ee245
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'hr', {
+ indent: 'Pomakni udesno',
+ outdent: 'Pomakni ulijevo'
+});
diff --git a/plugins/indent/lang/hu.js b/plugins/indent/lang/hu.js
new file mode 100644
index 0000000..6c76a34
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'hu', {
+ indent: 'Behúzás növelése',
+ outdent: 'Behúzás csökkentése'
+});
diff --git a/plugins/indent/lang/is.js b/plugins/indent/lang/is.js
new file mode 100644
index 0000000..c6e88fb
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'is', {
+ indent: 'Minnka inndrátt',
+ outdent: 'Auka inndrátt'
+});
diff --git a/plugins/indent/lang/it.js b/plugins/indent/lang/it.js
new file mode 100644
index 0000000..07f89b1
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'it', {
+ indent: 'Aumenta rientro',
+ outdent: 'Riduci rientro'
+});
diff --git a/plugins/indent/lang/ja.js b/plugins/indent/lang/ja.js
new file mode 100644
index 0000000..e7c17f8
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ja', {
+ indent: 'インデント',
+ outdent: 'インデント解除'
+});
diff --git a/plugins/indent/lang/ka.js b/plugins/indent/lang/ka.js
new file mode 100644
index 0000000..e472fd9
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ka', {
+ indent: 'მეტად შეწევა',
+ outdent: 'ნაკლებად შეწევა'
+});
diff --git a/plugins/indent/lang/km.js b/plugins/indent/lang/km.js
new file mode 100644
index 0000000..5971eab
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'km', {
+ indent: 'បន្ថែមការចូលបន្ទាត់',
+ outdent: 'បន្ថយការចូលបន្ទាត់'
+});
diff --git a/plugins/indent/lang/ko.js b/plugins/indent/lang/ko.js
new file mode 100644
index 0000000..29beb98
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ko', {
+ indent: '들여쓰기',
+ outdent: '내어쓰기'
+});
diff --git a/plugins/indent/lang/ku.js b/plugins/indent/lang/ku.js
new file mode 100644
index 0000000..3dced77
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ku', {
+ indent: 'زیادکردنی بۆشایی',
+ outdent: 'کەمکردنەوەی بۆشایی'
+});
diff --git a/plugins/indent/lang/lt.js b/plugins/indent/lang/lt.js
new file mode 100644
index 0000000..0f10935
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'lt', {
+ indent: 'Padidinti įtrauką',
+ outdent: 'Sumažinti įtrauką'
+});
diff --git a/plugins/indent/lang/lv.js b/plugins/indent/lang/lv.js
new file mode 100644
index 0000000..fabd993
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'lv', {
+ indent: 'Palielināt atkāpi',
+ outdent: 'Samazināt atkāpi'
+});
diff --git a/plugins/indent/lang/mk.js b/plugins/indent/lang/mk.js
new file mode 100644
index 0000000..46f89bd
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'mk', {
+ indent: 'Increase Indent', // MISSING
+ outdent: 'Decrease Indent' // MISSING
+});
diff --git a/plugins/indent/lang/mn.js b/plugins/indent/lang/mn.js
new file mode 100644
index 0000000..8e4b2f9
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'mn', {
+ indent: 'Догол мөр хасах',
+ outdent: 'Догол мөр нэмэх'
+});
diff --git a/plugins/indent/lang/ms.js b/plugins/indent/lang/ms.js
new file mode 100644
index 0000000..a0a2d3b
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ms', {
+ indent: 'Tambahkan Inden',
+ outdent: 'Kurangkan Inden'
+});
diff --git a/plugins/indent/lang/nb.js b/plugins/indent/lang/nb.js
new file mode 100644
index 0000000..9e344d8
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'nb', {
+ indent: 'Øk innrykk',
+ outdent: 'Reduser innrykk'
+});
diff --git a/plugins/indent/lang/nl.js b/plugins/indent/lang/nl.js
new file mode 100644
index 0000000..cd7100f
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'nl', {
+ indent: 'Inspringing vergroten',
+ outdent: 'Inspringing verkleinen'
+});
diff --git a/plugins/indent/lang/no.js b/plugins/indent/lang/no.js
new file mode 100644
index 0000000..b95d6eb
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'no', {
+ indent: 'Øk innrykk',
+ outdent: 'Reduser innrykk'
+});
diff --git a/plugins/indent/lang/pl.js b/plugins/indent/lang/pl.js
new file mode 100644
index 0000000..9a10c38
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'pl', {
+ indent: 'Zwiększ wcięcie',
+ outdent: 'Zmniejsz wcięcie'
+});
diff --git a/plugins/indent/lang/pt-br.js b/plugins/indent/lang/pt-br.js
new file mode 100644
index 0000000..2f8a957
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'pt-br', {
+ indent: 'Aumentar Recuo',
+ outdent: 'Diminuir Recuo'
+});
diff --git a/plugins/indent/lang/pt.js b/plugins/indent/lang/pt.js
new file mode 100644
index 0000000..8d2b7ef
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'pt', {
+ indent: 'Aumentar Avanço',
+ outdent: 'Diminuir Avanço'
+});
diff --git a/plugins/indent/lang/ro.js b/plugins/indent/lang/ro.js
new file mode 100644
index 0000000..c1a9c9e
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ro', {
+ indent: 'Creşte indentarea',
+ outdent: 'Scade indentarea'
+});
diff --git a/plugins/indent/lang/ru.js b/plugins/indent/lang/ru.js
new file mode 100644
index 0000000..0643903
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ru', {
+ indent: 'Увеличить отступ',
+ outdent: 'Уменьшить отступ'
+});
diff --git a/plugins/indent/lang/si.js b/plugins/indent/lang/si.js
new file mode 100644
index 0000000..376887e
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'si', {
+ indent: 'අතර පරතරය වැඩිකරන්න',
+ outdent: 'අතර පරතරය අඩුකරන්න'
+});
diff --git a/plugins/indent/lang/sk.js b/plugins/indent/lang/sk.js
new file mode 100644
index 0000000..acf960b
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'sk', {
+ indent: 'Zväčšiť odsadenie',
+ outdent: 'Zmenšiť odsadenie'
+});
diff --git a/plugins/indent/lang/sl.js b/plugins/indent/lang/sl.js
new file mode 100644
index 0000000..e8e8da8
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'sl', {
+ indent: 'Povečaj zamik',
+ outdent: 'Zmanjšaj zamik'
+});
diff --git a/plugins/indent/lang/sq.js b/plugins/indent/lang/sq.js
new file mode 100644
index 0000000..9bf7346
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'sq', {
+ indent: 'Rrite Identin',
+ outdent: 'Zvogëlo Identin'
+});
diff --git a/plugins/indent/lang/sr-latn.js b/plugins/indent/lang/sr-latn.js
new file mode 100644
index 0000000..9fe0a55
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'sr-latn', {
+ indent: 'Uvećaj levu marginu',
+ outdent: 'Smanji levu marginu'
+});
diff --git a/plugins/indent/lang/sr.js b/plugins/indent/lang/sr.js
new file mode 100644
index 0000000..6d894ca
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'sr', {
+ indent: 'Увећај леву маргину',
+ outdent: 'Смањи леву маргину'
+});
diff --git a/plugins/indent/lang/sv.js b/plugins/indent/lang/sv.js
new file mode 100644
index 0000000..ea56a57
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'sv', {
+ indent: 'Öka indrag',
+ outdent: 'Minska indrag'
+});
diff --git a/plugins/indent/lang/th.js b/plugins/indent/lang/th.js
new file mode 100644
index 0000000..2137f2e
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'th', {
+ indent: 'เพิ่มระยะย่อหน้า',
+ outdent: 'ลดระยะย่อหน้า'
+});
diff --git a/plugins/indent/lang/tr.js b/plugins/indent/lang/tr.js
new file mode 100644
index 0000000..57b10ca
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'tr', {
+ indent: 'Sekme Arttır',
+ outdent: 'Sekme Azalt'
+});
diff --git a/plugins/indent/lang/ug.js b/plugins/indent/lang/ug.js
new file mode 100644
index 0000000..63c962f
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'ug', {
+ indent: 'تارايت',
+ outdent: 'كەڭەيت'
+});
diff --git a/plugins/indent/lang/uk.js b/plugins/indent/lang/uk.js
new file mode 100644
index 0000000..765a230
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'uk', {
+ indent: 'Збільшити відступ',
+ outdent: 'Зменшити відступ'
+});
diff --git a/plugins/indent/lang/vi.js b/plugins/indent/lang/vi.js
new file mode 100644
index 0000000..c0c3734
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'vi', {
+ indent: 'Dịch vào trong',
+ outdent: 'Dịch ra ngoài'
+});
diff --git a/plugins/indent/lang/zh-cn.js b/plugins/indent/lang/zh-cn.js
new file mode 100644
index 0000000..15cf559
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'zh-cn', {
+ indent: '增加缩进量',
+ outdent: '减少缩进量'
+});
diff --git a/plugins/indent/lang/zh.js b/plugins/indent/lang/zh.js
new file mode 100644
index 0000000..dcfa448
--- /dev/null
+++ b/plugins/indent/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( 'indent', 'zh', {
+ indent: '增加縮排',
+ outdent: '減少縮排'
+});
diff --git a/plugins/indent/plugin.js b/plugins/indent/plugin.js
new file mode 100644
index 0000000..4c725d2
--- /dev/null
+++ b/plugins/indent/plugin.js
@@ -0,0 +1,435 @@
+/**
+ * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.html or http://ckeditor.com/license
+ */
+
+/**
+ * @fileOverview Increse and decrease indent commands.
+ */
+
+(function() {
+ var listNodeNames = { ol:1,ul:1 },
+ isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),
+ isNotBookmark = CKEDITOR.dom.walker.bookmark( false, true );
+
+ function indentCommand( editor, name ) {
+ this.name = name;
+ var useClasses = this.useIndentClasses = editor.config.indentClasses && editor.config.indentClasses.length > 0;
+ if ( useClasses ) {
+ this.classNameRegex = new RegExp( '(?:^|\\s+)(' + editor.config.indentClasses.join( '|' ) + ')(?=$|\\s)' );
+ this.indentClassMap = {};
+ for ( var i = 0; i < editor.config.indentClasses.length; i++ )
+ this.indentClassMap[ editor.config.indentClasses[ i ] ] = i + 1;
+ }
+
+ this.startDisabled = name == 'outdent';
+
+ this.allowedContent = {
+ 'div h1 h2 h3 h4 h5 h6 ol p pre ul': {
+ // Do not add elements, but only text-align style if element is validated by other rule.
+ propertiesOnly: true,
+ styles: !useClasses ? 'margin-left,margin-right' : null,
+ classes: useClasses ? editor.config.indentClasses : null
+ }
+ };
+
+ // #10192: Either blocks intendation or lists are required - acitvate
+ // indent commands in both situations. Lists are sufficient, because
+ // indent is needed for leaving list with enter key.
+ this.requiredContent = [
+ 'p' + ( useClasses ? '(' + editor.config.indentClasses[ 0 ] + ')' : '{margin-left}' ),
+ 'li'
+ ];
+ }
+
+ // Returns the CSS property to be used for identing a given element.
+ function getIndentCssProperty( element, dir ) {
+ return ( dir || element.getComputedStyle( 'direction' ) ) == 'ltr' ? 'margin-left' : 'margin-right';
+ }
+
+ function isListItem( node ) {
+ return node.type == CKEDITOR.NODE_ELEMENT && node.is( 'li' );
+ }
+
+ indentCommand.prototype = {
+ // It applies to a "block-like" context.
+ context: 'p',
+
+ refresh: function( editor, path ) {
+ var list = path && path.contains( listNodeNames ),
+ firstBlock = path.block || path.blockLimit;
+
+ if ( list )
+ this.setState( CKEDITOR.TRISTATE_OFF );
+
+ else if ( !this.useIndentClasses && this.name == 'indent' )
+ this.setState( CKEDITOR.TRISTATE_OFF );
+
+ else if ( !firstBlock )
+ this.setState( CKEDITOR.TRISTATE_DISABLED );
+
+ else if ( this.useIndentClasses ) {
+ var indentClass = firstBlock.$.className.match( this.classNameRegex ),
+ indentStep = 0;
+
+ if ( indentClass ) {
+ indentClass = indentClass[ 1 ];
+ indentStep = this.indentClassMap[ indentClass ];
+ }
+
+ if ( ( this.name == 'outdent' && !indentStep ) || ( this.name == 'indent' && indentStep == editor.config.indentClasses.length ) )
+ this.setState( CKEDITOR.TRISTATE_DISABLED );
+ else
+ this.setState( CKEDITOR.TRISTATE_OFF );
+ } else {
+ var indent = parseInt( firstBlock.getStyle( getIndentCssProperty( firstBlock ) ), 10 );
+ if ( isNaN( indent ) )
+ indent = 0;
+ if ( indent <= 0 )
+ this.setState( CKEDITOR.TRISTATE_DISABLED );
+ else
+ this.setState( CKEDITOR.TRISTATE_OFF );
+ }
+ },
+ exec: function( editor ) {
+ var self = this,
+ database = {};
+
+ function indentList( listNode ) {
+ // Our starting and ending points of the range might be inside some blocks under a list item...
+ // So before playing with the iterator, we need to expand the block to include the list items.
+ var startContainer = range.startContainer,
+ endContainer = range.endContainer;
+ while ( startContainer && !startContainer.getParent().equals( listNode ) )
+ startContainer = startContainer.getParent();
+ while ( endContainer && !endContainer.getParent().equals( listNode ) )
+ endContainer = endContainer.getParent();
+
+ if ( !startContainer || !endContainer )
+ return;
+
+ // Now we can iterate over the individual items on the same tree depth.
+ var block = startContainer,
+ itemsToMove = [],
+ stopFlag = false;
+ while ( !stopFlag ) {
+ if ( block.equals( endContainer ) )
+ stopFlag = true;
+ itemsToMove.push( block );
+ block = block.getNext();
+ }
+ if ( itemsToMove.length < 1 )
+ return;
+
+ // Do indent or outdent operations on the array model of the list, not the
+ // list's DOM tree itself. The array model demands that it knows as much as
+ // possible about the surrounding lists, we need to feed it the further
+ // ancestor node that is still a list.
+ var listParents = listNode.getParents( true );
+ for ( var i = 0; i < listParents.length; i++ ) {
+ if ( listParents[ i ].getName && listNodeNames[ listParents[ i ].getName() ] ) {
+ listNode = listParents[ i ];
+ break;
+ }
+ }
+ var indentOffset = self.name == 'indent' ? 1 : -1,
+ startItem = itemsToMove[ 0 ],
+ lastItem = itemsToMove[ itemsToMove.length - 1 ];
+
+ // Convert the list DOM tree into a one dimensional array.
+ var listArray = CKEDITOR.plugins.list.listToArray( listNode, database );
+
+ // Apply indenting or outdenting on the array.
+ var baseIndent = listArray[ lastItem.getCustomData( 'listarray_index' ) ].indent;
+ for ( i = startItem.getCustomData( 'listarray_index' ); i <= lastItem.getCustomData( 'listarray_index' ); i++ ) {
+ listArray[ i ].indent += indentOffset;
+ // Make sure the newly created sublist get a brand-new element of the same type. (#5372)
+ if ( indentOffset > 0 ) {
+ var listRoot = listArray[ i ].parent;
+ listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() );
+ }
+ }
+
+ for ( i = lastItem.getCustomData( 'listarray_index' ) + 1;
+ i < listArray.length && listArray[ i ].indent > baseIndent; i++ )
+ listArray[ i ].indent += indentOffset;
+
+ // Convert the array back to a DOM forest (yes we might have a few subtrees now).
+ // And replace the old list with the new forest.
+ var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, listNode.getDirection() );
+
+ // Avoid nested <li> after outdent even they're visually same,
+ // recording them for later refactoring.(#3982)
+ if ( self.name == 'outdent' ) {
+ var parentLiElement;
+ if ( ( parentLiElement = listNode.getParent() ) && parentLiElement.is( 'li' ) ) {
+ var children = newList.listNode.getChildren(),
+ pendingLis = [],
+ count = children.count(),
+ child;
+
+ for ( i = count - 1; i >= 0; i-- ) {
+ if ( ( child = children.getItem( i ) ) && child.is && child.is( 'li' ) )
+ pendingLis.push( child );
+ }
+ }
+ }
+
+ if ( newList )
+ newList.listNode.replace( listNode );
+
+ // Move the nested <li> to be appeared after the parent.
+ if ( pendingLis && pendingLis.length ) {
+ for ( i = 0; i < pendingLis.length; i++ ) {
+ var li = pendingLis[ i ],
+ followingList = li;
+
+ // Nest preceding <ul>/<ol> inside current <li> if any.
+ while ( ( followingList = followingList.getNext() ) && followingList.is && followingList.getName() in listNodeNames ) {
+ // IE requires a filler NBSP for nested list inside empty list item,
+ // otherwise the list item will be inaccessiable. (#4476)
+ if ( CKEDITOR.env.ie && !li.getFirst( function( node ) {
+ return isNotWhitespaces( node ) && isNotBookmark( node );
+ }))
+ li.append( range.document.createText( '\u00a0' ) );
+
+ li.append( followingList );
+ }
+
+ li.insertAfter( parentLiElement );
+ }
+ }
+ }
+
+ function indentBlock() {
+ var iterator = range.createIterator(),
+ enterMode = editor.config.enterMode;
+ iterator.enforceRealBlocks = true;
+ iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;
+ var block;
+ while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) )
+ indentElement( block );
+ }
+
+ function indentElement( element, dir ) {
+ if ( element.getCustomData( 'indent_processed' ) )
+ return false;
+
+ if ( self.useIndentClasses ) {
+ // Transform current class name to indent step index.
+ var indentClass = element.$.className.match( self.classNameRegex ),
+ indentStep = 0;
+ if ( indentClass ) {
+ indentClass = indentClass[ 1 ];
+ indentStep = self.indentClassMap[ indentClass ];
+ }
+
+ // Operate on indent step index, transform indent step index back to class
+ // name.
+ if ( self.name == 'outdent' )
+ indentStep--;
+ else
+ indentStep++;
+
+ if ( indentStep < 0 )
+ return false;
+
+ indentStep = Math.min( indentStep, editor.config.indentClasses.length );
+ indentStep = Math.max( indentStep, 0 );
+ element.$.className = CKEDITOR.tools.ltrim( element.$.className.replace( self.classNameRegex, '' ) );
+ if ( indentStep > 0 )
+ element.addClass( editor.config.indentClasses[ indentStep - 1 ] );
+ } else {
+ var indentCssProperty = getIndentCssProperty( element, dir ),
+ currentOffset = parseInt( element.getStyle( indentCssProperty ), 10 );
+ if ( isNaN( currentOffset ) )
+ currentOffset = 0;
+ var indentOffset = editor.config.indentOffset || 40;
+ currentOffset += ( self.name == 'indent' ? 1 : -1 ) * indentOffset;
+
+ if ( currentOffset < 0 )
+ return false;
+
+ currentOffset = Math.max( currentOffset, 0 );
+ currentOffset = Math.ceil( currentOffset / indentOffset ) * indentOffset;
+ element.setStyle( indentCssProperty, currentOffset ? currentOffset + ( editor.config.indentUnit || 'px' ) : '' );
+ if ( element.getAttribute( 'style' ) === '' )
+ element.removeAttribute( 'style' );
+ }
+
+ CKEDITOR.dom.element.setMarker( database, element, 'indent_processed', 1 );
+ return true;
+ }
+
+ var selection = editor.getSelection(),
+ bookmarks = selection.createBookmarks( 1 ),
+ ranges = selection && selection.getRanges( 1 ),
+ range;
+
+
+ var iterator = ranges.createIterator();
+ while ( ( range = iterator.getNextRange() ) ) {
+ var rangeRoot = range.getCommonAncestor(),
+ nearestListBlock = rangeRoot;
+
+ while ( nearestListBlock && !( nearestListBlock.type == CKEDITOR.NODE_ELEMENT && listNodeNames[ nearestListBlock.getName() ] ) )
+ nearestListBlock = nearestListBlock.getParent();
+
+ // Avoid having selection enclose the entire list. (#6138)
+ // [<ul><li>...</li></ul>] =><ul><li>[...]</li></ul>
+ if ( !nearestListBlock ) {
+ var selectedNode = range.getEnclosedNode();
+ if ( selectedNode && selectedNode.type == CKEDITOR.NODE_ELEMENT && selectedNode.getName() in listNodeNames ) {
+ range.setStartAt( selectedNode, CKEDITOR.POSITION_AFTER_START );
+ range.setEndAt( selectedNode, CKEDITOR.POSITION_BEFORE_END );
+ nearestListBlock = selectedNode;
+ }
+ }
+
+ // Avoid selection anchors under list root.
+ // <ul>[<li>...</li>]</ul> => <ul><li>[...]</li></ul>
+ if ( nearestListBlock && range.startContainer.type == CKEDITOR.NODE_ELEMENT && range.startContainer.getName() in listNodeNames ) {
+ var walker = new CKEDITOR.dom.walker( range );
+ walker.evaluator = isListItem;
+ range.startContainer = walker.next();
+ }
+
+ if ( nearestListBlock && range.endContainer.type == CKEDITOR.NODE_ELEMENT && range.endContainer.getName() in listNodeNames ) {
+ walker = new CKEDITOR.dom.walker( range );
+ walker.evaluator = isListItem;
+ range.endContainer = walker.previous();
+ }
+
+ if ( nearestListBlock ) {
+ var firstListItem = nearestListBlock.getFirst( isListItem ),
+ hasMultipleItems = !!firstListItem.getNext( isListItem ),
+ rangeStart = range.startContainer,
+ indentWholeList = firstListItem.equals( rangeStart ) || firstListItem.contains( rangeStart );
+
+ // Indent the entire list if cursor is inside the first list item. (#3893)
+ // Only do that for indenting or when using indent classes or when there is something to outdent. (#6141)
+ if ( !( indentWholeList && ( self.name == 'indent' || self.useIndentClasses || parseInt( nearestListBlock.getStyle( getIndentCssProperty( nearestListBlock ) ), 10 ) ) && indentElement( nearestListBlock, !hasMultipleItems && firstListItem.getDirection() ) ) )
+ indentList( nearestListBlock );
+ } else
+ indentBlock();
+ }
+
+ // Clean up the markers.
+ CKEDITOR.dom.element.clearAllMarkers( database );
+
+ editor.forceNextSelectionCheck();
+ selection.selectBookmarks( bookmarks );
+ }
+ };
+
+ CKEDITOR.plugins.add( 'indent', {
+ // TODO: Remove this dependency.
+ requires: 'list',
+ 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: 'indent,indent-rtl,outdent,outdent-rtl', // %REMOVE_LINE_CORE%
+ onLoad: function() {
+ // [IE6/7] Raw lists are using margin instead of padding for visual indentation in wysiwyg mode. (#3893)
+ if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ) {
+ CKEDITOR.addCss( ".cke_editable ul," +
+ ".cke_editable ol" +
+ "{" +
+ " margin-left: 0px;" +
+ " padding-left: 40px;" +
+ "}" );
+ }
+ },
+ init: function( editor ) {
+ if ( editor.blockless )
+ return;
+
+ // Register commands.
+ var indent = editor.addCommand( 'indent', new indentCommand( editor, 'indent' ) ),
+ outdent = editor.addCommand( 'outdent', new indentCommand( editor, 'outdent' ) );
+
+ if ( editor.ui.addButton ) {
+ // Register the toolbar buttons.
+ editor.ui.addButton( 'Indent', {
+ label: editor.lang.indent.indent,
+ command: 'indent',
+ directional: true,
+ toolbar: 'indent,20'
+ });
+ editor.ui.addButton( 'Outdent', {
+ label: editor.lang.indent.outdent,
+ command: 'outdent',
+ directional: true,
+ toolbar: 'indent,10'
+ });
+ }
+
+ // Register dirChanged listener.
+ editor.on( 'dirChanged', function( e ) {
+ var range = editor.createRange();
+ range.setStartBefore( e.data.node );
+ range.setEndAfter( e.data.node );
+
+ var walker = new CKEDITOR.dom.walker( range ),
+ node;
+
+ while ( ( node = walker.next() ) ) {
+ if ( node.type == CKEDITOR.NODE_ELEMENT ) {
+ // A child with the defined dir is to be ignored.
+ if ( !node.equals( e.data.node ) && node.getDirection() ) {
+ range.setStartAfter( node );
+ walker = new CKEDITOR.dom.walker( range );
+ continue;
+ }
+
+ // Switch alignment classes.
+ var classes = editor.config.indentClasses;
+ if ( classes ) {
+ var suffix = ( e.data.dir == 'ltr' ) ? [ '_rtl', '' ] : [ '', '_rtl' ];
+ for ( var i = 0; i < classes.length; i++ ) {
+ if ( node.hasClass( classes[ i ] + suffix[ 0 ] ) ) {
+ node.removeClass( classes[ i ] + suffix[ 0 ] );
+ node.addClass( classes[ i ] + suffix[ 1 ] );
+ }
+ }
+ }
+
+ // Switch the margins.
+ var marginLeft = node.getStyle( 'margin-right' ),
+ marginRight = node.getStyle( 'margin-left' );
+
+ marginLeft ? node.setStyle( 'margin-left', marginLeft ) : node.removeStyle( 'margin-left' );
+ marginRight ? node.setStyle( 'margin-right', marginRight ) : node.removeStyle( 'margin-right' );
+ }
+ }
+ });
+ }
+ });
+})();
+
+/**
+ * Size of each indentation step.
+ *
+ * config.indentOffset = 4;
+ *
+ * @cfg {Number} [indentOffset=40]
+ * @member CKEDITOR.config
+ */
+
+/**
+ * Unit for the indentation style.
+ *
+ * config.indentUnit = 'em';
+ *
+ * @cfg {String} [indentUnit='px']
+ * @member CKEDITOR.config
+ */
+
+/**
+ * List of classes to use for indenting the contents. If it's `null`, no classes will be used
+ * and instead the {@link #indentUnit} and {@link #indentOffset} properties will be used.
+ *
+ * // Use the classes 'Indent1', 'Indent2', 'Indent3'
+ * config.indentClasses = ['Indent1', 'Indent2', 'Indent3'];
+ *
+ * @cfg {Array} [indentClasses=null]
+ * @member CKEDITOR.config
+ */