summaryrefslogtreecommitdiff
path: root/plugins/undo
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/undo')
-rw-r--r--plugins/undo/icons/redo-rtl.pngbin0 -> 846 bytes
-rw-r--r--plugins/undo/icons/redo.pngbin0 -> 835 bytes
-rw-r--r--plugins/undo/icons/undo-rtl.pngbin0 -> 835 bytes
-rw-r--r--plugins/undo/icons/undo.pngbin0 -> 844 bytes
-rw-r--r--plugins/undo/lang/af.js8
-rw-r--r--plugins/undo/lang/ar.js8
-rw-r--r--plugins/undo/lang/bg.js8
-rw-r--r--plugins/undo/lang/bn.js8
-rw-r--r--plugins/undo/lang/bs.js8
-rw-r--r--plugins/undo/lang/ca.js8
-rw-r--r--plugins/undo/lang/cs.js8
-rw-r--r--plugins/undo/lang/cy.js8
-rw-r--r--plugins/undo/lang/da.js8
-rw-r--r--plugins/undo/lang/de.js8
-rw-r--r--plugins/undo/lang/el.js8
-rw-r--r--plugins/undo/lang/en-au.js8
-rw-r--r--plugins/undo/lang/en-ca.js8
-rw-r--r--plugins/undo/lang/en-gb.js8
-rw-r--r--plugins/undo/lang/en.js8
-rw-r--r--plugins/undo/lang/eo.js8
-rw-r--r--plugins/undo/lang/es.js8
-rw-r--r--plugins/undo/lang/et.js8
-rw-r--r--plugins/undo/lang/eu.js8
-rw-r--r--plugins/undo/lang/fa.js8
-rw-r--r--plugins/undo/lang/fi.js8
-rw-r--r--plugins/undo/lang/fo.js8
-rw-r--r--plugins/undo/lang/fr-ca.js8
-rw-r--r--plugins/undo/lang/fr.js8
-rw-r--r--plugins/undo/lang/gl.js8
-rw-r--r--plugins/undo/lang/gu.js8
-rw-r--r--plugins/undo/lang/he.js8
-rw-r--r--plugins/undo/lang/hi.js8
-rw-r--r--plugins/undo/lang/hr.js8
-rw-r--r--plugins/undo/lang/hu.js8
-rw-r--r--plugins/undo/lang/is.js8
-rw-r--r--plugins/undo/lang/it.js8
-rw-r--r--plugins/undo/lang/ja.js8
-rw-r--r--plugins/undo/lang/ka.js8
-rw-r--r--plugins/undo/lang/km.js8
-rw-r--r--plugins/undo/lang/ko.js8
-rw-r--r--plugins/undo/lang/ku.js8
-rw-r--r--plugins/undo/lang/lt.js8
-rw-r--r--plugins/undo/lang/lv.js8
-rw-r--r--plugins/undo/lang/mk.js8
-rw-r--r--plugins/undo/lang/mn.js8
-rw-r--r--plugins/undo/lang/ms.js8
-rw-r--r--plugins/undo/lang/nb.js8
-rw-r--r--plugins/undo/lang/nl.js8
-rw-r--r--plugins/undo/lang/no.js8
-rw-r--r--plugins/undo/lang/pl.js8
-rw-r--r--plugins/undo/lang/pt-br.js8
-rw-r--r--plugins/undo/lang/pt.js8
-rw-r--r--plugins/undo/lang/ro.js8
-rw-r--r--plugins/undo/lang/ru.js8
-rw-r--r--plugins/undo/lang/si.js8
-rw-r--r--plugins/undo/lang/sk.js8
-rw-r--r--plugins/undo/lang/sl.js8
-rw-r--r--plugins/undo/lang/sq.js8
-rw-r--r--plugins/undo/lang/sr-latn.js8
-rw-r--r--plugins/undo/lang/sr.js8
-rw-r--r--plugins/undo/lang/sv.js8
-rw-r--r--plugins/undo/lang/th.js8
-rw-r--r--plugins/undo/lang/tr.js8
-rw-r--r--plugins/undo/lang/ug.js8
-rw-r--r--plugins/undo/lang/uk.js8
-rw-r--r--plugins/undo/lang/vi.js8
-rw-r--r--plugins/undo/lang/zh-cn.js8
-rw-r--r--plugins/undo/lang/zh.js8
-rw-r--r--plugins/undo/plugin.js660
69 files changed, 1172 insertions, 0 deletions
diff --git a/plugins/undo/icons/redo-rtl.png b/plugins/undo/icons/redo-rtl.png
new file mode 100644
index 0000000..31e8bba
--- /dev/null
+++ b/plugins/undo/icons/redo-rtl.png
Binary files differ
diff --git a/plugins/undo/icons/redo.png b/plugins/undo/icons/redo.png
new file mode 100644
index 0000000..a9b7e0f
--- /dev/null
+++ b/plugins/undo/icons/redo.png
Binary files differ
diff --git a/plugins/undo/icons/undo-rtl.png b/plugins/undo/icons/undo-rtl.png
new file mode 100644
index 0000000..a9b7e0f
--- /dev/null
+++ b/plugins/undo/icons/undo-rtl.png
Binary files differ
diff --git a/plugins/undo/icons/undo.png b/plugins/undo/icons/undo.png
new file mode 100644
index 0000000..49170a3
--- /dev/null
+++ b/plugins/undo/icons/undo.png
Binary files differ
diff --git a/plugins/undo/lang/af.js b/plugins/undo/lang/af.js
new file mode 100644
index 0000000..456bf7d
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'af', {
+ redo: 'Oordoen',
+ undo: 'Ontdoen'
+});
diff --git a/plugins/undo/lang/ar.js b/plugins/undo/lang/ar.js
new file mode 100644
index 0000000..b400066
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ar', {
+ redo: 'إعادة',
+ undo: 'تراجع'
+});
diff --git a/plugins/undo/lang/bg.js b/plugins/undo/lang/bg.js
new file mode 100644
index 0000000..471df8c
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'bg', {
+ redo: 'Връщане на предишен статус',
+ undo: 'Възтанови'
+});
diff --git a/plugins/undo/lang/bn.js b/plugins/undo/lang/bn.js
new file mode 100644
index 0000000..1081fca
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'bn', {
+ redo: 'রি-ডু',
+ undo: 'আনডু'
+});
diff --git a/plugins/undo/lang/bs.js b/plugins/undo/lang/bs.js
new file mode 100644
index 0000000..93206ec
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'bs', {
+ redo: 'Ponovi',
+ undo: 'Vrati'
+});
diff --git a/plugins/undo/lang/ca.js b/plugins/undo/lang/ca.js
new file mode 100644
index 0000000..3872e54
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ca', {
+ redo: 'Refés',
+ undo: 'Desfés'
+});
diff --git a/plugins/undo/lang/cs.js b/plugins/undo/lang/cs.js
new file mode 100644
index 0000000..b2b60ce
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'cs', {
+ redo: 'Znovu',
+ undo: 'Zpět'
+});
diff --git a/plugins/undo/lang/cy.js b/plugins/undo/lang/cy.js
new file mode 100644
index 0000000..7ac465b
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'cy', {
+ redo: 'Ailadrodd',
+ undo: 'Dadwneud'
+});
diff --git a/plugins/undo/lang/da.js b/plugins/undo/lang/da.js
new file mode 100644
index 0000000..68b0adf
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'da', {
+ redo: 'Annullér fortryd',
+ undo: 'Fortryd'
+});
diff --git a/plugins/undo/lang/de.js b/plugins/undo/lang/de.js
new file mode 100644
index 0000000..130725f
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'de', {
+ redo: 'Wiederherstellen',
+ undo: 'Rückgängig'
+});
diff --git a/plugins/undo/lang/el.js b/plugins/undo/lang/el.js
new file mode 100644
index 0000000..ac9fc04
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'el', {
+ redo: 'Επαναφορά',
+ undo: 'Αναίρεση'
+});
diff --git a/plugins/undo/lang/en-au.js b/plugins/undo/lang/en-au.js
new file mode 100644
index 0000000..98abecd
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'en-au', {
+ redo: 'Redo',
+ undo: 'Undo'
+});
diff --git a/plugins/undo/lang/en-ca.js b/plugins/undo/lang/en-ca.js
new file mode 100644
index 0000000..0f64795
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'en-ca', {
+ redo: 'Redo',
+ undo: 'Undo'
+});
diff --git a/plugins/undo/lang/en-gb.js b/plugins/undo/lang/en-gb.js
new file mode 100644
index 0000000..fc2b805
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'en-gb', {
+ redo: 'Redo',
+ undo: 'Undo'
+});
diff --git a/plugins/undo/lang/en.js b/plugins/undo/lang/en.js
new file mode 100644
index 0000000..a0bc199
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'en', {
+ redo: 'Redo',
+ undo: 'Undo'
+});
diff --git a/plugins/undo/lang/eo.js b/plugins/undo/lang/eo.js
new file mode 100644
index 0000000..c2c6518
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'eo', {
+ redo: 'Refari',
+ undo: 'Malfari'
+});
diff --git a/plugins/undo/lang/es.js b/plugins/undo/lang/es.js
new file mode 100644
index 0000000..5f3e107
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'es', {
+ redo: 'Rehacer',
+ undo: 'Deshacer'
+});
diff --git a/plugins/undo/lang/et.js b/plugins/undo/lang/et.js
new file mode 100644
index 0000000..8dfd84f
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'et', {
+ redo: 'Toimingu kordamine',
+ undo: 'Tagasivõtmine'
+});
diff --git a/plugins/undo/lang/eu.js b/plugins/undo/lang/eu.js
new file mode 100644
index 0000000..5cde89f
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'eu', {
+ redo: 'Berregin',
+ undo: 'Desegin'
+});
diff --git a/plugins/undo/lang/fa.js b/plugins/undo/lang/fa.js
new file mode 100644
index 0000000..132c107
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'fa', {
+ redo: 'بازچیدن',
+ undo: 'واچیدن'
+});
diff --git a/plugins/undo/lang/fi.js b/plugins/undo/lang/fi.js
new file mode 100644
index 0000000..5cdc7c7
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'fi', {
+ redo: 'Toista',
+ undo: 'Kumoa'
+});
diff --git a/plugins/undo/lang/fo.js b/plugins/undo/lang/fo.js
new file mode 100644
index 0000000..da3710e
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'fo', {
+ redo: 'Vend aftur',
+ undo: 'Angra'
+});
diff --git a/plugins/undo/lang/fr-ca.js b/plugins/undo/lang/fr-ca.js
new file mode 100644
index 0000000..cc0860d
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'fr-ca', {
+ redo: 'Refaire',
+ undo: 'Annuler'
+});
diff --git a/plugins/undo/lang/fr.js b/plugins/undo/lang/fr.js
new file mode 100644
index 0000000..dc6d108
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'fr', {
+ redo: 'Rétablir',
+ undo: 'Annuler'
+});
diff --git a/plugins/undo/lang/gl.js b/plugins/undo/lang/gl.js
new file mode 100644
index 0000000..5c71850
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'gl', {
+ redo: 'Refacer',
+ undo: 'Desfacer'
+});
diff --git a/plugins/undo/lang/gu.js b/plugins/undo/lang/gu.js
new file mode 100644
index 0000000..7985a91
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'gu', {
+ redo: 'રિડૂ; પછી હતી એવી સ્થિતિ પાછી લાવવી',
+ undo: 'રદ કરવું; પહેલાં હતી એવી સ્થિતિ પાછી લાવવી'
+});
diff --git a/plugins/undo/lang/he.js b/plugins/undo/lang/he.js
new file mode 100644
index 0000000..0487244
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'he', {
+ redo: 'חזרה על צעד אחרון',
+ undo: 'ביטול צעד אחרון'
+});
diff --git a/plugins/undo/lang/hi.js b/plugins/undo/lang/hi.js
new file mode 100644
index 0000000..2ca4654
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'hi', {
+ redo: 'रीडू',
+ undo: 'अन्डू'
+});
diff --git a/plugins/undo/lang/hr.js b/plugins/undo/lang/hr.js
new file mode 100644
index 0000000..9b6905d
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'hr', {
+ redo: 'Ponovi',
+ undo: 'Poništi'
+});
diff --git a/plugins/undo/lang/hu.js b/plugins/undo/lang/hu.js
new file mode 100644
index 0000000..87b77d4
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'hu', {
+ redo: 'Ismétlés',
+ undo: 'Visszavonás'
+});
diff --git a/plugins/undo/lang/is.js b/plugins/undo/lang/is.js
new file mode 100644
index 0000000..c285a85
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'is', {
+ redo: 'Hætta við afturköllun',
+ undo: 'Afturkalla'
+});
diff --git a/plugins/undo/lang/it.js b/plugins/undo/lang/it.js
new file mode 100644
index 0000000..2739cdc
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'it', {
+ redo: 'Ripristina',
+ undo: 'Annulla'
+});
diff --git a/plugins/undo/lang/ja.js b/plugins/undo/lang/ja.js
new file mode 100644
index 0000000..4ace84c
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ja', {
+ redo: 'やり直し',
+ undo: '元に戻す'
+});
diff --git a/plugins/undo/lang/ka.js b/plugins/undo/lang/ka.js
new file mode 100644
index 0000000..250cb3f
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ka', {
+ redo: 'გამეორება',
+ undo: 'გაუქმება'
+});
diff --git a/plugins/undo/lang/km.js b/plugins/undo/lang/km.js
new file mode 100644
index 0000000..d5590fd
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'km', {
+ redo: 'ធ្វើ​ឡើង​វិញ',
+ undo: 'មិន​ធ្វើ​វិញ'
+});
diff --git a/plugins/undo/lang/ko.js b/plugins/undo/lang/ko.js
new file mode 100644
index 0000000..76fa98c
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ko', {
+ redo: '재실행',
+ undo: '취소'
+});
diff --git a/plugins/undo/lang/ku.js b/plugins/undo/lang/ku.js
new file mode 100644
index 0000000..9446aaa
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ku', {
+ redo: 'هەڵگەڕاندنەوە',
+ undo: 'پووچکردنەوە'
+});
diff --git a/plugins/undo/lang/lt.js b/plugins/undo/lang/lt.js
new file mode 100644
index 0000000..578cf1f
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'lt', {
+ redo: 'Atstatyti',
+ undo: 'Atšaukti'
+});
diff --git a/plugins/undo/lang/lv.js b/plugins/undo/lang/lv.js
new file mode 100644
index 0000000..b087898
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'lv', {
+ redo: 'Atkārtot',
+ undo: 'Atcelt'
+});
diff --git a/plugins/undo/lang/mk.js b/plugins/undo/lang/mk.js
new file mode 100644
index 0000000..8ef26fc
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'mk', {
+ redo: 'Redo', // MISSING
+ undo: 'Undo'
+});
diff --git a/plugins/undo/lang/mn.js b/plugins/undo/lang/mn.js
new file mode 100644
index 0000000..e766dc9
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'mn', {
+ redo: 'Өмнөх үйлдлээ сэргээх',
+ undo: 'Хүчингүй болгох'
+});
diff --git a/plugins/undo/lang/ms.js b/plugins/undo/lang/ms.js
new file mode 100644
index 0000000..95d7aaf
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ms', {
+ redo: 'Ulangkan',
+ undo: 'Batalkan'
+});
diff --git a/plugins/undo/lang/nb.js b/plugins/undo/lang/nb.js
new file mode 100644
index 0000000..573374a
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'nb', {
+ redo: 'Gjør om',
+ undo: 'Angre'
+});
diff --git a/plugins/undo/lang/nl.js b/plugins/undo/lang/nl.js
new file mode 100644
index 0000000..5bd6632
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'nl', {
+ redo: 'Opnieuw uitvoeren',
+ undo: 'Ongedaan maken'
+});
diff --git a/plugins/undo/lang/no.js b/plugins/undo/lang/no.js
new file mode 100644
index 0000000..fd21650
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'no', {
+ redo: 'Gjør om',
+ undo: 'Angre'
+});
diff --git a/plugins/undo/lang/pl.js b/plugins/undo/lang/pl.js
new file mode 100644
index 0000000..dfb7e80
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'pl', {
+ redo: 'Ponów',
+ undo: 'Cofnij'
+});
diff --git a/plugins/undo/lang/pt-br.js b/plugins/undo/lang/pt-br.js
new file mode 100644
index 0000000..aea7f82
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'pt-br', {
+ redo: 'Refazer',
+ undo: 'Desfazer'
+});
diff --git a/plugins/undo/lang/pt.js b/plugins/undo/lang/pt.js
new file mode 100644
index 0000000..6266c23
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'pt', {
+ redo: 'Repetir',
+ undo: 'Anular'
+});
diff --git a/plugins/undo/lang/ro.js b/plugins/undo/lang/ro.js
new file mode 100644
index 0000000..b07fa43
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ro', {
+ redo: 'Starea ulterioară (redo)',
+ undo: 'Starea anterioară (undo)'
+});
diff --git a/plugins/undo/lang/ru.js b/plugins/undo/lang/ru.js
new file mode 100644
index 0000000..a1958b9
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ru', {
+ redo: 'Повторить',
+ undo: 'Отменить'
+});
diff --git a/plugins/undo/lang/si.js b/plugins/undo/lang/si.js
new file mode 100644
index 0000000..5ab54e9
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'si', {
+ redo: 'නැවත කිරීම',
+ undo: 'වෙනස් කිරීම'
+});
diff --git a/plugins/undo/lang/sk.js b/plugins/undo/lang/sk.js
new file mode 100644
index 0000000..d81754a
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'sk', {
+ redo: 'Znovu',
+ undo: 'Späť'
+});
diff --git a/plugins/undo/lang/sl.js b/plugins/undo/lang/sl.js
new file mode 100644
index 0000000..8f9821a
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'sl', {
+ redo: 'Ponovi',
+ undo: 'Razveljavi'
+});
diff --git a/plugins/undo/lang/sq.js b/plugins/undo/lang/sq.js
new file mode 100644
index 0000000..dc5c01d
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'sq', {
+ redo: 'Ribëje',
+ undo: 'Rizhbëje'
+});
diff --git a/plugins/undo/lang/sr-latn.js b/plugins/undo/lang/sr-latn.js
new file mode 100644
index 0000000..0039cf6
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'sr-latn', {
+ redo: 'Ponovi akciju',
+ undo: 'Poni�ti akciju'
+});
diff --git a/plugins/undo/lang/sr.js b/plugins/undo/lang/sr.js
new file mode 100644
index 0000000..df4a5b8
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'sr', {
+ redo: 'Понови акцију',
+ undo: 'Поништи акцију'
+});
diff --git a/plugins/undo/lang/sv.js b/plugins/undo/lang/sv.js
new file mode 100644
index 0000000..ad3a485
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'sv', {
+ redo: 'Gör om',
+ undo: 'Ångra'
+});
diff --git a/plugins/undo/lang/th.js b/plugins/undo/lang/th.js
new file mode 100644
index 0000000..d455ee9
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'th', {
+ redo: 'ทำซ้ำคำสั่ง',
+ undo: 'ยกเลิกคำสั่ง'
+});
diff --git a/plugins/undo/lang/tr.js b/plugins/undo/lang/tr.js
new file mode 100644
index 0000000..9c28f5a
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'tr', {
+ redo: 'Tekrarla',
+ undo: 'Geri Al'
+});
diff --git a/plugins/undo/lang/ug.js b/plugins/undo/lang/ug.js
new file mode 100644
index 0000000..83de4e2
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'ug', {
+ redo: 'قايتىلا ',
+ undo: 'يېنىۋال'
+});
diff --git a/plugins/undo/lang/uk.js b/plugins/undo/lang/uk.js
new file mode 100644
index 0000000..d6b418c
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'uk', {
+ redo: 'Повторити',
+ undo: 'Повернути'
+});
diff --git a/plugins/undo/lang/vi.js b/plugins/undo/lang/vi.js
new file mode 100644
index 0000000..7f7ba10
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'vi', {
+ redo: 'Làm lại thao tác',
+ undo: 'Khôi phục thao tác'
+});
diff --git a/plugins/undo/lang/zh-cn.js b/plugins/undo/lang/zh-cn.js
new file mode 100644
index 0000000..ed90186
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'zh-cn', {
+ redo: '重做',
+ undo: '撤消'
+});
diff --git a/plugins/undo/lang/zh.js b/plugins/undo/lang/zh.js
new file mode 100644
index 0000000..a36db04
--- /dev/null
+++ b/plugins/undo/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( 'undo', 'zh', {
+ redo: '重複',
+ undo: '復原'
+});
diff --git a/plugins/undo/plugin.js b/plugins/undo/plugin.js
new file mode 100644
index 0000000..534ae73
--- /dev/null
+++ b/plugins/undo/plugin.js
@@ -0,0 +1,660 @@
+/**
+ * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.html or http://ckeditor.com/license
+ */
+
+/**
+ * @fileOverview Undo/Redo system for saving shapshot for document modification
+ * and other recordable changes.
+ */
+
+(function() {
+ CKEDITOR.plugins.add( 'undo', {
+ 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: 'redo,redo-rtl,undo,undo-rtl', // %REMOVE_LINE_CORE%
+ init: function( editor ) {
+ var undoManager = new UndoManager( editor );
+
+ var undoCommand = editor.addCommand( 'undo', {
+ exec: function() {
+ if ( undoManager.undo() ) {
+ editor.selectionChange();
+ this.fire( 'afterUndo' );
+ }
+ },
+ state: CKEDITOR.TRISTATE_DISABLED,
+ canUndo: false
+ });
+
+ var redoCommand = editor.addCommand( 'redo', {
+ exec: function() {
+ if ( undoManager.redo() ) {
+ editor.selectionChange();
+ this.fire( 'afterRedo' );
+ }
+ },
+ state: CKEDITOR.TRISTATE_DISABLED,
+ canUndo: false
+ });
+
+ editor.setKeystroke( [
+ [ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ],
+ [ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ],
+ [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 /*Z*/, 'redo' ]
+ ] );
+
+ undoManager.onChange = function() {
+ undoCommand.setState( undoManager.undoable() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED );
+ redoCommand.setState( undoManager.redoable() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED );
+ };
+
+ function recordCommand( event ) {
+ // If the command hasn't been marked to not support undo.
+ if ( undoManager.enabled && event.data.command.canUndo !== false )
+ undoManager.save();
+ }
+
+ // We'll save snapshots before and after executing a command.
+ editor.on( 'beforeCommandExec', recordCommand );
+ editor.on( 'afterCommandExec', recordCommand );
+
+ // Save snapshots before doing custom changes.
+ editor.on( 'saveSnapshot', function( evt ) {
+ undoManager.save( evt.data && evt.data.contentOnly );
+ });
+
+ // Registering keydown on every document recreation.(#3844)
+ editor.on( 'contentDom', function() {
+ editor.editable().on( 'keydown', function( event ) {
+ // Do not capture CTRL hotkeys.
+ if ( !event.data.$.ctrlKey && !event.data.$.metaKey )
+ undoManager.type( event );
+ });
+ });
+
+ // Always save an undo snapshot - the previous mode might have
+ // changed editor contents.
+ editor.on( 'beforeModeUnload', function() {
+ editor.mode == 'wysiwyg' && undoManager.save( true );
+ });
+
+ function toggleUndoManager() {
+ undoManager.enabled = editor.readOnly ? false : editor.mode == 'wysiwyg';
+ undoManager.onChange();
+ }
+
+ // Make the undo manager available only in wysiwyg mode.
+ editor.on( 'mode', toggleUndoManager );
+
+ // Disable undo manager when in read-only mode.
+ editor.on( 'readOnly', toggleUndoManager );
+
+ if ( editor.ui.addButton ) {
+ editor.ui.addButton( 'Undo', {
+ label: editor.lang.undo.undo,
+ command: 'undo',
+ toolbar: 'undo,10'
+ });
+
+ editor.ui.addButton( 'Redo', {
+ label: editor.lang.undo.redo,
+ command: 'redo',
+ toolbar: 'undo,20'
+ });
+ }
+
+ /**
+ * Reset undo stack.
+ *
+ * @member CKEDITOR.editor
+ */
+ editor.resetUndo = function() {
+ // Reset the undo stack.
+ undoManager.reset();
+
+ // Create the first image.
+ editor.fire( 'saveSnapshot' );
+ };
+
+ /**
+ * Amend the top of undo stack (last undo image) with the current DOM changes.
+ *
+ * function() {
+ * editor.fire( 'saveSnapshot' );
+ * editor.document.body.append(...);
+ * // Make new changes following the last undo snapshot part of it.
+ * editor.fire( 'updateSnapshot' );
+ * ..
+ * }
+ *
+ * @event updateSnapshot
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ */
+ editor.on( 'updateSnapshot', function() {
+ if ( undoManager.currentImage )
+ undoManager.update();
+ });
+
+ /**
+ * Lock manager to prevent any save/update operations.
+ *
+ * It's convenient to lock manager before doing DOM operations
+ * that shouldn't be recored (e.g. auto paragraphing).
+ *
+ * See {@link CKEDITOR.plugins.undo.UndoManager#lock} for more details.
+ *
+ * **Note:** In order to unlock the Undo Manager {@link #unlockSnapshot} has to be fired
+ * number of times `lockSnapshot` has been fired.
+ *
+ * @since 4.0
+ * @event lockSnapshot
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ */
+ editor.on( 'lockSnapshot', undoManager.lock, undoManager );
+
+ /**
+ * Unlock manager and update latest snapshot.
+ *
+ * @since 4.0
+ * @event unlockSnapshot
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ */
+ editor.on( 'unlockSnapshot', undoManager.unlock, undoManager );
+ }
+ });
+
+ CKEDITOR.plugins.undo = {};
+
+ /**
+ * Undo snapshot which represents the current document status.
+ *
+ * @private
+ * @class CKEDITOR.plugins.undo.Image
+ * @constructor Creates an Image class instance.
+ * @param {CKEDITOR.editor} editor The editor instance on which the image is created.
+ */
+ var Image = CKEDITOR.plugins.undo.Image = function( editor ) {
+ this.editor = editor;
+
+ editor.fire( 'beforeUndoImage' );
+
+ var contents = editor.getSnapshot(),
+ selection = contents && editor.getSelection();
+
+ // In IE, we need to remove the expando attributes.
+ CKEDITOR.env.ie && contents && ( contents = contents.replace( /\s+data-cke-expando=".*?"/g, '' ) );
+
+ this.contents = contents;
+ this.bookmarks = selection && selection.createBookmarks2( true );
+
+ editor.fire( 'afterUndoImage' );
+ };
+
+ // Attributes that browser may changing them when setting via innerHTML.
+ var protectedAttrs = /\b(?:href|src|name)="[^"]*?"/gi;
+
+ Image.prototype = {
+ equals: function( otherImage, contentOnly ) {
+
+ var thisContents = this.contents,
+ otherContents = otherImage.contents;
+
+ // For IE6/7 : Comparing only the protected attribute values but not the original ones.(#4522)
+ if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) {
+ thisContents = thisContents.replace( protectedAttrs, '' );
+ otherContents = otherContents.replace( protectedAttrs, '' );
+ }
+
+ if ( thisContents != otherContents )
+ return false;
+
+ if ( contentOnly )
+ return true;
+
+ var bookmarksA = this.bookmarks,
+ bookmarksB = otherImage.bookmarks;
+
+ if ( bookmarksA || bookmarksB ) {
+ if ( !bookmarksA || !bookmarksB || bookmarksA.length != bookmarksB.length )
+ return false;
+
+ for ( var i = 0; i < bookmarksA.length; i++ ) {
+ var bookmarkA = bookmarksA[ i ],
+ bookmarkB = bookmarksB[ i ];
+
+ if ( bookmarkA.startOffset != bookmarkB.startOffset || bookmarkA.endOffset != bookmarkB.endOffset || !CKEDITOR.tools.arrayCompare( bookmarkA.start, bookmarkB.start ) || !CKEDITOR.tools.arrayCompare( bookmarkA.end, bookmarkB.end ) ) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+ };
+
+ /**
+ * Main logic for Redo/Undo feature.
+ *
+ * **Note:** This class isn't accessible from the global scope.
+ *
+ * @private
+ * @class CKEDITOR.plugins.undo.UndoManager
+ * @constructor Creates an UndoManager class instance.
+ * @param {CKEDITOR.editor} editor
+ */
+ function UndoManager( editor ) {
+ this.editor = editor;
+
+ // Reset the undo stack.
+ this.reset();
+ }
+
+ var editingKeyCodes = { /*Backspace*/8:1,/*Delete*/46:1 },
+ modifierKeyCodes = { /*Shift*/16:1,/*Ctrl*/17:1,/*Alt*/18:1 },
+ navigationKeyCodes = { 37:1,38:1,39:1,40:1 }; // Arrows: L, T, R, B
+
+ UndoManager.prototype = {
+ /**
+ * When `locked` property is not `null` manager is locked, so
+ * operations like `save` or `update` are forbidden.
+ *
+ * Manager can be locked/unlocked by {@link #lock} and {@link #unlock} methods.
+ *
+ * @private
+ * @property {Object} [locked=null]
+ */
+
+ /**
+ * Process undo system regard keystrikes.
+ * @param {CKEDITOR.dom.event} event
+ */
+ type: function( event ) {
+ var keystroke = event && event.data.getKey(),
+ isModifierKey = keystroke in modifierKeyCodes,
+ isEditingKey = keystroke in editingKeyCodes,
+ wasEditingKey = this.lastKeystroke in editingKeyCodes,
+ sameAsLastEditingKey = isEditingKey && keystroke == this.lastKeystroke,
+ // Keystrokes which navigation through contents.
+ isReset = keystroke in navigationKeyCodes,
+ wasReset = this.lastKeystroke in navigationKeyCodes,
+
+ // Keystrokes which just introduce new contents.
+ isContent = ( !isEditingKey && !isReset ),
+
+ // Create undo snap for every different modifier key.
+ modifierSnapshot = ( isEditingKey && !sameAsLastEditingKey ),
+ // Create undo snap on the following cases:
+ // 1. Just start to type .
+ // 2. Typing some content after a modifier.
+ // 3. Typing some content after make a visible selection.
+ startedTyping = !( isModifierKey || this.typing ) || ( isContent && ( wasEditingKey || wasReset ) );
+
+ if ( startedTyping || modifierSnapshot ) {
+ var beforeTypeImage = new Image( this.editor ),
+ beforeTypeCount = this.snapshots.length;
+
+ // Use setTimeout, so we give the necessary time to the
+ // browser to insert the character into the DOM.
+ CKEDITOR.tools.setTimeout( function() {
+ var currentSnapshot = this.editor.getSnapshot();
+
+ // In IE, we need to remove the expando attributes.
+ if ( CKEDITOR.env.ie )
+ currentSnapshot = currentSnapshot.replace( /\s+data-cke-expando=".*?"/g, '' );
+
+ // If changes have taken place, while not been captured yet (#8459),
+ // compensate the snapshot.
+ if ( beforeTypeImage.contents != currentSnapshot && beforeTypeCount == this.snapshots.length ) {
+ // It's safe to now indicate typing state.
+ this.typing = true;
+
+ // This's a special save, with specified snapshot
+ // and without auto 'fireChange'.
+ if ( !this.save( false, beforeTypeImage, false ) )
+ // Drop future snapshots.
+ this.snapshots.splice( this.index + 1, this.snapshots.length - this.index - 1 );
+
+ this.hasUndo = true;
+ this.hasRedo = false;
+
+ this.typesCount = 1;
+ this.modifiersCount = 1;
+
+ this.onChange();
+ }
+ }, 0, this );
+ }
+
+ this.lastKeystroke = keystroke;
+
+ // Create undo snap after typed too much (over 25 times).
+ if ( isEditingKey ) {
+ this.typesCount = 0;
+ this.modifiersCount++;
+
+ if ( this.modifiersCount > 25 ) {
+ this.save( false, null, false );
+ this.modifiersCount = 1;
+ }
+ } else if ( !isReset ) {
+ this.modifiersCount = 0;
+ this.typesCount++;
+
+ if ( this.typesCount > 25 ) {
+ this.save( false, null, false );
+ this.typesCount = 1;
+ }
+ }
+
+ },
+
+ /**
+ * Reset the undo stack.
+ */
+ reset: function() {
+ // Remember last pressed key.
+ this.lastKeystroke = 0;
+
+ // Stack for all the undo and redo snapshots, they're always created/removed
+ // in consistency.
+ this.snapshots = [];
+
+ // Current snapshot history index.
+ this.index = -1;
+
+ this.limit = this.editor.config.undoStackSize || 20;
+
+ this.currentImage = null;
+
+ this.hasUndo = false;
+ this.hasRedo = false;
+ this.locked = null;
+
+ this.resetType();
+ },
+
+ /**
+ * Reset all states about typing.
+ *
+ * @see #type
+ */
+ resetType: function() {
+ this.typing = false;
+ delete this.lastKeystroke;
+ this.typesCount = 0;
+ this.modifiersCount = 0;
+ },
+
+ fireChange: function() {
+ this.hasUndo = !!this.getNextImage( true );
+ this.hasRedo = !!this.getNextImage( false );
+ // Reset typing
+ this.resetType();
+ this.onChange();
+ },
+
+ /**
+ * Save a snapshot of document image for later retrieve.
+ */
+ save: function( onContentOnly, image, autoFireChange ) {
+ // Do not change snapshots stack when locked.
+ if ( this.locked )
+ return false;
+
+ var snapshots = this.snapshots;
+
+ // Get a content image.
+ if ( !image )
+ image = new Image( this.editor );
+
+ // Do nothing if it was not possible to retrieve an image.
+ if ( image.contents === false )
+ return false;
+
+ // Check if this is a duplicate. In such case, do nothing.
+ if ( this.currentImage && image.equals( this.currentImage, onContentOnly ) )
+ return false;
+
+ // Drop future snapshots.
+ snapshots.splice( this.index + 1, snapshots.length - this.index - 1 );
+
+ // If we have reached the limit, remove the oldest one.
+ if ( snapshots.length == this.limit )
+ snapshots.shift();
+
+ // Add the new image, updating the current index.
+ this.index = snapshots.push( image ) - 1;
+
+ this.currentImage = image;
+
+ if ( autoFireChange !== false )
+ this.fireChange();
+ return true;
+ },
+
+ restoreImage: function( image ) {
+ // Bring editor focused to restore selection.
+ var editor = this.editor,
+ sel;
+
+ if ( image.bookmarks ) {
+ editor.focus();
+ // Retrieve the selection beforehand. (#8324)
+ sel = editor.getSelection();
+ }
+
+ // Start transaction - do not allow any mutations to the
+ // snapshots stack done when selecting bookmarks (much probably
+ // by selectionChange listener).
+ this.locked = 1;
+
+ this.editor.loadSnapshot( image.contents );
+
+ if ( image.bookmarks )
+ sel.selectBookmarks( image.bookmarks );
+ else if ( CKEDITOR.env.ie ) {
+ // IE BUG: If I don't set the selection to *somewhere* after setting
+ // document contents, then IE would create an empty paragraph at the bottom
+ // the next time the document is modified.
+ var $range = this.editor.document.getBody().$.createTextRange();
+ $range.collapse( true );
+ $range.select();
+ }
+
+ this.locked = 0;
+
+ this.index = image.index;
+
+ // Update current image with the actual editor
+ // content, since actualy content may differ from
+ // the original snapshot due to dom change. (#4622)
+ this.update();
+ this.fireChange();
+ },
+
+ // Get the closest available image.
+ getNextImage: function( isUndo ) {
+ var snapshots = this.snapshots,
+ currentImage = this.currentImage,
+ image, i;
+
+ if ( currentImage ) {
+ if ( isUndo ) {
+ for ( i = this.index - 1; i >= 0; i-- ) {
+ image = snapshots[ i ];
+ if ( !currentImage.equals( image, true ) ) {
+ image.index = i;
+ return image;
+ }
+ }
+ } else {
+ for ( i = this.index + 1; i < snapshots.length; i++ ) {
+ image = snapshots[ i ];
+ if ( !currentImage.equals( image, true ) ) {
+ image.index = i;
+ return image;
+ }
+ }
+ }
+ }
+
+ return null;
+ },
+
+ /**
+ * Check the current redo state.
+ *
+ * @returns {Boolean} Whether the document has previous state to retrieve.
+ */
+ redoable: function() {
+ return this.enabled && this.hasRedo;
+ },
+
+ /**
+ * Check the current undo state.
+ *
+ * @returns {Boolean} Whether the document has future state to restore.
+ */
+ undoable: function() {
+ return this.enabled && this.hasUndo;
+ },
+
+ /**
+ * Perform undo on current index.
+ */
+ undo: function() {
+ if ( this.undoable() ) {
+ this.save( true );
+
+ var image = this.getNextImage( true );
+ if ( image )
+ return this.restoreImage( image ), true;
+ }
+
+ return false;
+ },
+
+ /**
+ * Perform redo on current index.
+ */
+ redo: function() {
+ if ( this.redoable() ) {
+ // Try to save. If no changes have been made, the redo stack
+ // will not change, so it will still be redoable.
+ this.save( true );
+
+ // If instead we had changes, we can't redo anymore.
+ if ( this.redoable() ) {
+ var image = this.getNextImage( false );
+ if ( image )
+ return this.restoreImage( image ), true;
+ }
+ }
+
+ return false;
+ },
+
+ /**
+ * Update the last snapshot of the undo stack with the current editor content.
+ */
+ update: function() {
+ // Do not change snapshots stack is locked.
+ if ( !this.locked )
+ this.snapshots.splice( this.index, 1, ( this.currentImage = new Image( this.editor ) ) );
+ },
+
+ /**
+ * Lock the snapshot stack to prevent any save/update operations, and additionally
+ * update the tip snapshot with the DOM changes during the locked period when necessary,
+ * after the {@link #unlock} method is called.
+ *
+ * It's mainly used for ensure any DOM operations that shouldn't be recorded (e.g. auto paragraphing).
+ *
+ * **Note:** For every `lock` call you must call {@link #unlock} once to unlock the Undo Manager.
+ *
+ * @since 4.0
+ */
+ lock: function() {
+ if ( !this.locked ) {
+ var imageBefore = new Image( this.editor );
+
+ // If current editor content matches the tip of snapshot stack,
+ // the stack tip must be updated by unlock, to include any changes made
+ // during this period.
+ var matchedTip = this.currentImage && this.currentImage.equals( imageBefore, true );
+
+ this.locked = { update: matchedTip ? imageBefore : null, level: 1 };
+ }
+ // Increase the level of lock.
+ else
+ this.locked.level++;
+ },
+
+ /**
+ * Unlock the snapshot stack and check to amend the last snapshot.
+ *
+ * See {@link #lock} for more details.
+ *
+ * @since 4.0
+ */
+ unlock: function() {
+ if ( this.locked ) {
+ // Decrease level of lock and check if equals 0, what means that undoM is completely unlocked.
+ if ( !--this.locked.level ) {
+ var updateImage = this.locked.update;
+
+ this.locked = null;
+
+ if ( updateImage && !updateImage.equals( new Image( this.editor ), true ) )
+ this.update();
+ }
+ }
+ }
+ };
+})();
+
+/**
+ * The number of undo steps to be saved. The higher this setting value the more
+ * memory is used for it.
+ *
+ * config.undoStackSize = 50;
+ *
+ * @cfg {Number} [undoStackSize=20]
+ * @member CKEDITOR.config
+ */
+
+/**
+ * Fired when the editor is about to save an undo snapshot. This event can be
+ * fired by plugins and customizations to make the editor saving undo snapshots.
+ *
+ * @event saveSnapshot
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ */
+
+/**
+ * Fired before an undo image is to be taken. An undo image represents the
+ * editor state at some point. It's saved into an undo store, so the editor is
+ * able to recover the editor state on undo and redo operations.
+ *
+ * @since 3.5.3
+ * @event beforeUndoImage
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ * @see CKEDITOR.editor#afterUndoImage
+ */
+
+/**
+ * Fired after an undo image is taken. An undo image represents the
+ * editor state at some point. It's saved into an undo store, so the editor is
+ * able to recover the editor state on undo and redo operations.
+ *
+ * @since 3.5.3
+ * @event afterUndoImage
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ * @see CKEDITOR.editor#beforeUndoImage
+ */