From 7adcb81e4f83f98c468889aaa5a85558ba88c770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 25 Jan 2016 17:45:33 +0100 Subject: Initial commit --- .../removeformat/icons/hidpi/removeformat.png | Bin 0 -> 2119 bytes .../plugins/removeformat/icons/removeformat.png | Bin 0 -> 871 bytes sources/plugins/removeformat/lang/af.js | 7 + sources/plugins/removeformat/lang/ar.js | 7 + sources/plugins/removeformat/lang/bg.js | 7 + sources/plugins/removeformat/lang/bn.js | 7 + sources/plugins/removeformat/lang/bs.js | 7 + sources/plugins/removeformat/lang/ca.js | 7 + sources/plugins/removeformat/lang/cs.js | 7 + sources/plugins/removeformat/lang/cy.js | 7 + sources/plugins/removeformat/lang/da.js | 7 + sources/plugins/removeformat/lang/de.js | 7 + sources/plugins/removeformat/lang/el.js | 7 + sources/plugins/removeformat/lang/en-au.js | 7 + sources/plugins/removeformat/lang/en-ca.js | 7 + sources/plugins/removeformat/lang/en-gb.js | 7 + sources/plugins/removeformat/lang/en.js | 7 + sources/plugins/removeformat/lang/eo.js | 7 + sources/plugins/removeformat/lang/es.js | 7 + sources/plugins/removeformat/lang/et.js | 7 + sources/plugins/removeformat/lang/eu.js | 7 + sources/plugins/removeformat/lang/fa.js | 7 + sources/plugins/removeformat/lang/fi.js | 7 + sources/plugins/removeformat/lang/fo.js | 7 + sources/plugins/removeformat/lang/fr-ca.js | 7 + sources/plugins/removeformat/lang/fr.js | 7 + sources/plugins/removeformat/lang/gl.js | 7 + sources/plugins/removeformat/lang/gu.js | 7 + sources/plugins/removeformat/lang/he.js | 7 + sources/plugins/removeformat/lang/hi.js | 7 + sources/plugins/removeformat/lang/hr.js | 7 + sources/plugins/removeformat/lang/hu.js | 7 + sources/plugins/removeformat/lang/id.js | 7 + sources/plugins/removeformat/lang/is.js | 7 + sources/plugins/removeformat/lang/it.js | 7 + sources/plugins/removeformat/lang/ja.js | 7 + sources/plugins/removeformat/lang/ka.js | 7 + sources/plugins/removeformat/lang/km.js | 7 + sources/plugins/removeformat/lang/ko.js | 7 + sources/plugins/removeformat/lang/ku.js | 7 + sources/plugins/removeformat/lang/lt.js | 7 + sources/plugins/removeformat/lang/lv.js | 7 + sources/plugins/removeformat/lang/mk.js | 7 + sources/plugins/removeformat/lang/mn.js | 7 + sources/plugins/removeformat/lang/ms.js | 7 + sources/plugins/removeformat/lang/nb.js | 7 + sources/plugins/removeformat/lang/nl.js | 7 + sources/plugins/removeformat/lang/no.js | 7 + sources/plugins/removeformat/lang/pl.js | 7 + sources/plugins/removeformat/lang/pt-br.js | 7 + sources/plugins/removeformat/lang/pt.js | 7 + sources/plugins/removeformat/lang/ro.js | 7 + sources/plugins/removeformat/lang/ru.js | 7 + sources/plugins/removeformat/lang/si.js | 7 + sources/plugins/removeformat/lang/sk.js | 7 + sources/plugins/removeformat/lang/sl.js | 7 + sources/plugins/removeformat/lang/sq.js | 7 + sources/plugins/removeformat/lang/sr-latn.js | 7 + sources/plugins/removeformat/lang/sr.js | 7 + sources/plugins/removeformat/lang/sv.js | 7 + sources/plugins/removeformat/lang/th.js | 7 + sources/plugins/removeformat/lang/tr.js | 7 + sources/plugins/removeformat/lang/tt.js | 7 + sources/plugins/removeformat/lang/ug.js | 7 + sources/plugins/removeformat/lang/uk.js | 7 + sources/plugins/removeformat/lang/vi.js | 7 + sources/plugins/removeformat/lang/zh-cn.js | 7 + sources/plugins/removeformat/lang/zh.js | 7 + sources/plugins/removeformat/plugin.js | 193 +++++++++++++++++++++ 69 files changed, 655 insertions(+) create mode 100644 sources/plugins/removeformat/icons/hidpi/removeformat.png create mode 100644 sources/plugins/removeformat/icons/removeformat.png create mode 100644 sources/plugins/removeformat/lang/af.js create mode 100644 sources/plugins/removeformat/lang/ar.js create mode 100644 sources/plugins/removeformat/lang/bg.js create mode 100644 sources/plugins/removeformat/lang/bn.js create mode 100644 sources/plugins/removeformat/lang/bs.js create mode 100644 sources/plugins/removeformat/lang/ca.js create mode 100644 sources/plugins/removeformat/lang/cs.js create mode 100644 sources/plugins/removeformat/lang/cy.js create mode 100644 sources/plugins/removeformat/lang/da.js create mode 100644 sources/plugins/removeformat/lang/de.js create mode 100644 sources/plugins/removeformat/lang/el.js create mode 100644 sources/plugins/removeformat/lang/en-au.js create mode 100644 sources/plugins/removeformat/lang/en-ca.js create mode 100644 sources/plugins/removeformat/lang/en-gb.js create mode 100644 sources/plugins/removeformat/lang/en.js create mode 100644 sources/plugins/removeformat/lang/eo.js create mode 100644 sources/plugins/removeformat/lang/es.js create mode 100644 sources/plugins/removeformat/lang/et.js create mode 100644 sources/plugins/removeformat/lang/eu.js create mode 100644 sources/plugins/removeformat/lang/fa.js create mode 100644 sources/plugins/removeformat/lang/fi.js create mode 100644 sources/plugins/removeformat/lang/fo.js create mode 100644 sources/plugins/removeformat/lang/fr-ca.js create mode 100644 sources/plugins/removeformat/lang/fr.js create mode 100644 sources/plugins/removeformat/lang/gl.js create mode 100644 sources/plugins/removeformat/lang/gu.js create mode 100644 sources/plugins/removeformat/lang/he.js create mode 100644 sources/plugins/removeformat/lang/hi.js create mode 100644 sources/plugins/removeformat/lang/hr.js create mode 100644 sources/plugins/removeformat/lang/hu.js create mode 100644 sources/plugins/removeformat/lang/id.js create mode 100644 sources/plugins/removeformat/lang/is.js create mode 100644 sources/plugins/removeformat/lang/it.js create mode 100644 sources/plugins/removeformat/lang/ja.js create mode 100644 sources/plugins/removeformat/lang/ka.js create mode 100644 sources/plugins/removeformat/lang/km.js create mode 100644 sources/plugins/removeformat/lang/ko.js create mode 100644 sources/plugins/removeformat/lang/ku.js create mode 100644 sources/plugins/removeformat/lang/lt.js create mode 100644 sources/plugins/removeformat/lang/lv.js create mode 100644 sources/plugins/removeformat/lang/mk.js create mode 100644 sources/plugins/removeformat/lang/mn.js create mode 100644 sources/plugins/removeformat/lang/ms.js create mode 100644 sources/plugins/removeformat/lang/nb.js create mode 100644 sources/plugins/removeformat/lang/nl.js create mode 100644 sources/plugins/removeformat/lang/no.js create mode 100644 sources/plugins/removeformat/lang/pl.js create mode 100644 sources/plugins/removeformat/lang/pt-br.js create mode 100644 sources/plugins/removeformat/lang/pt.js create mode 100644 sources/plugins/removeformat/lang/ro.js create mode 100644 sources/plugins/removeformat/lang/ru.js create mode 100644 sources/plugins/removeformat/lang/si.js create mode 100644 sources/plugins/removeformat/lang/sk.js create mode 100644 sources/plugins/removeformat/lang/sl.js create mode 100644 sources/plugins/removeformat/lang/sq.js create mode 100644 sources/plugins/removeformat/lang/sr-latn.js create mode 100644 sources/plugins/removeformat/lang/sr.js create mode 100644 sources/plugins/removeformat/lang/sv.js create mode 100644 sources/plugins/removeformat/lang/th.js create mode 100644 sources/plugins/removeformat/lang/tr.js create mode 100644 sources/plugins/removeformat/lang/tt.js create mode 100644 sources/plugins/removeformat/lang/ug.js create mode 100644 sources/plugins/removeformat/lang/uk.js create mode 100644 sources/plugins/removeformat/lang/vi.js create mode 100644 sources/plugins/removeformat/lang/zh-cn.js create mode 100644 sources/plugins/removeformat/lang/zh.js create mode 100644 sources/plugins/removeformat/plugin.js (limited to 'sources/plugins/removeformat') diff --git a/sources/plugins/removeformat/icons/hidpi/removeformat.png b/sources/plugins/removeformat/icons/hidpi/removeformat.png new file mode 100644 index 00000000..910b0a3c Binary files /dev/null and b/sources/plugins/removeformat/icons/hidpi/removeformat.png differ diff --git a/sources/plugins/removeformat/icons/removeformat.png b/sources/plugins/removeformat/icons/removeformat.png new file mode 100644 index 00000000..1bc9b386 Binary files /dev/null and b/sources/plugins/removeformat/icons/removeformat.png differ diff --git a/sources/plugins/removeformat/lang/af.js b/sources/plugins/removeformat/lang/af.js new file mode 100644 index 00000000..a4aa5367 --- /dev/null +++ b/sources/plugins/removeformat/lang/af.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'af', { + toolbar: 'Verwyder opmaak' +} ); diff --git a/sources/plugins/removeformat/lang/ar.js b/sources/plugins/removeformat/lang/ar.js new file mode 100644 index 00000000..16217eb3 --- /dev/null +++ b/sources/plugins/removeformat/lang/ar.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ar', { + toolbar: 'إزالة التنسيقات' +} ); diff --git a/sources/plugins/removeformat/lang/bg.js b/sources/plugins/removeformat/lang/bg.js new file mode 100644 index 00000000..01d1348f --- /dev/null +++ b/sources/plugins/removeformat/lang/bg.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'bg', { + toolbar: 'Премахване на форматирането' +} ); diff --git a/sources/plugins/removeformat/lang/bn.js b/sources/plugins/removeformat/lang/bn.js new file mode 100644 index 00000000..0e54f499 --- /dev/null +++ b/sources/plugins/removeformat/lang/bn.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'bn', { + toolbar: 'ফরমেট সরাও' +} ); diff --git a/sources/plugins/removeformat/lang/bs.js b/sources/plugins/removeformat/lang/bs.js new file mode 100644 index 00000000..55e0b7e5 --- /dev/null +++ b/sources/plugins/removeformat/lang/bs.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'bs', { + toolbar: 'Poništi format' +} ); diff --git a/sources/plugins/removeformat/lang/ca.js b/sources/plugins/removeformat/lang/ca.js new file mode 100644 index 00000000..d2507469 --- /dev/null +++ b/sources/plugins/removeformat/lang/ca.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ca', { + toolbar: 'Elimina Format' +} ); diff --git a/sources/plugins/removeformat/lang/cs.js b/sources/plugins/removeformat/lang/cs.js new file mode 100644 index 00000000..3e16778e --- /dev/null +++ b/sources/plugins/removeformat/lang/cs.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'cs', { + toolbar: 'Odstranit formátování' +} ); diff --git a/sources/plugins/removeformat/lang/cy.js b/sources/plugins/removeformat/lang/cy.js new file mode 100644 index 00000000..3c8606e6 --- /dev/null +++ b/sources/plugins/removeformat/lang/cy.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'cy', { + toolbar: 'Tynnu Fformat' +} ); diff --git a/sources/plugins/removeformat/lang/da.js b/sources/plugins/removeformat/lang/da.js new file mode 100644 index 00000000..5599b638 --- /dev/null +++ b/sources/plugins/removeformat/lang/da.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'da', { + toolbar: 'Fjern formatering' +} ); diff --git a/sources/plugins/removeformat/lang/de.js b/sources/plugins/removeformat/lang/de.js new file mode 100644 index 00000000..8361c14b --- /dev/null +++ b/sources/plugins/removeformat/lang/de.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'de', { + toolbar: 'Formatierung entfernen' +} ); diff --git a/sources/plugins/removeformat/lang/el.js b/sources/plugins/removeformat/lang/el.js new file mode 100644 index 00000000..6f69f98c --- /dev/null +++ b/sources/plugins/removeformat/lang/el.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'el', { + toolbar: 'Εκκαθάριση Μορφοποίησης' +} ); diff --git a/sources/plugins/removeformat/lang/en-au.js b/sources/plugins/removeformat/lang/en-au.js new file mode 100644 index 00000000..61bc04ee --- /dev/null +++ b/sources/plugins/removeformat/lang/en-au.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'en-au', { + toolbar: 'Remove Format' +} ); diff --git a/sources/plugins/removeformat/lang/en-ca.js b/sources/plugins/removeformat/lang/en-ca.js new file mode 100644 index 00000000..213048cc --- /dev/null +++ b/sources/plugins/removeformat/lang/en-ca.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'en-ca', { + toolbar: 'Remove Format' +} ); diff --git a/sources/plugins/removeformat/lang/en-gb.js b/sources/plugins/removeformat/lang/en-gb.js new file mode 100644 index 00000000..020d1e46 --- /dev/null +++ b/sources/plugins/removeformat/lang/en-gb.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'en-gb', { + toolbar: 'Remove Format' +} ); diff --git a/sources/plugins/removeformat/lang/en.js b/sources/plugins/removeformat/lang/en.js new file mode 100644 index 00000000..6a27bd00 --- /dev/null +++ b/sources/plugins/removeformat/lang/en.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'en', { + toolbar: 'Remove Format' +} ); diff --git a/sources/plugins/removeformat/lang/eo.js b/sources/plugins/removeformat/lang/eo.js new file mode 100644 index 00000000..c7e8057b --- /dev/null +++ b/sources/plugins/removeformat/lang/eo.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'eo', { + toolbar: 'Forigi Formaton' +} ); diff --git a/sources/plugins/removeformat/lang/es.js b/sources/plugins/removeformat/lang/es.js new file mode 100644 index 00000000..fca22159 --- /dev/null +++ b/sources/plugins/removeformat/lang/es.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'es', { + toolbar: 'Eliminar Formato' +} ); diff --git a/sources/plugins/removeformat/lang/et.js b/sources/plugins/removeformat/lang/et.js new file mode 100644 index 00000000..5d2b3361 --- /dev/null +++ b/sources/plugins/removeformat/lang/et.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'et', { + toolbar: 'Vormingu eemaldamine' +} ); diff --git a/sources/plugins/removeformat/lang/eu.js b/sources/plugins/removeformat/lang/eu.js new file mode 100644 index 00000000..ba7a0e5d --- /dev/null +++ b/sources/plugins/removeformat/lang/eu.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'eu', { + toolbar: 'Kendu formatua' +} ); diff --git a/sources/plugins/removeformat/lang/fa.js b/sources/plugins/removeformat/lang/fa.js new file mode 100644 index 00000000..c31b7b2c --- /dev/null +++ b/sources/plugins/removeformat/lang/fa.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'fa', { + toolbar: 'برداشتن فرمت' +} ); diff --git a/sources/plugins/removeformat/lang/fi.js b/sources/plugins/removeformat/lang/fi.js new file mode 100644 index 00000000..9f34c3bc --- /dev/null +++ b/sources/plugins/removeformat/lang/fi.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'fi', { + toolbar: 'Poista muotoilu' +} ); diff --git a/sources/plugins/removeformat/lang/fo.js b/sources/plugins/removeformat/lang/fo.js new file mode 100644 index 00000000..b30ac5f9 --- /dev/null +++ b/sources/plugins/removeformat/lang/fo.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'fo', { + toolbar: 'Strika sniðgeving' +} ); diff --git a/sources/plugins/removeformat/lang/fr-ca.js b/sources/plugins/removeformat/lang/fr-ca.js new file mode 100644 index 00000000..b266ef7e --- /dev/null +++ b/sources/plugins/removeformat/lang/fr-ca.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'fr-ca', { + toolbar: 'Supprimer le formatage' +} ); diff --git a/sources/plugins/removeformat/lang/fr.js b/sources/plugins/removeformat/lang/fr.js new file mode 100644 index 00000000..8822f12d --- /dev/null +++ b/sources/plugins/removeformat/lang/fr.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'fr', { + toolbar: 'Supprimer la mise en forme' +} ); diff --git a/sources/plugins/removeformat/lang/gl.js b/sources/plugins/removeformat/lang/gl.js new file mode 100644 index 00000000..7c8ad55b --- /dev/null +++ b/sources/plugins/removeformat/lang/gl.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'gl', { + toolbar: 'Retirar o formato' +} ); diff --git a/sources/plugins/removeformat/lang/gu.js b/sources/plugins/removeformat/lang/gu.js new file mode 100644 index 00000000..4c92c3d6 --- /dev/null +++ b/sources/plugins/removeformat/lang/gu.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'gu', { + toolbar: 'ફૉર્મટ કાઢવું' +} ); diff --git a/sources/plugins/removeformat/lang/he.js b/sources/plugins/removeformat/lang/he.js new file mode 100644 index 00000000..082c285e --- /dev/null +++ b/sources/plugins/removeformat/lang/he.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'he', { + toolbar: 'הסרת העיצוב' +} ); diff --git a/sources/plugins/removeformat/lang/hi.js b/sources/plugins/removeformat/lang/hi.js new file mode 100644 index 00000000..90202b4a --- /dev/null +++ b/sources/plugins/removeformat/lang/hi.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'hi', { + toolbar: 'फ़ॉर्मैट हटायें' +} ); diff --git a/sources/plugins/removeformat/lang/hr.js b/sources/plugins/removeformat/lang/hr.js new file mode 100644 index 00000000..804bcfe9 --- /dev/null +++ b/sources/plugins/removeformat/lang/hr.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'hr', { + toolbar: 'Ukloni formatiranje' +} ); diff --git a/sources/plugins/removeformat/lang/hu.js b/sources/plugins/removeformat/lang/hu.js new file mode 100644 index 00000000..b3190cbc --- /dev/null +++ b/sources/plugins/removeformat/lang/hu.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'hu', { + toolbar: 'Formázás eltávolítása' +} ); diff --git a/sources/plugins/removeformat/lang/id.js b/sources/plugins/removeformat/lang/id.js new file mode 100644 index 00000000..c1449777 --- /dev/null +++ b/sources/plugins/removeformat/lang/id.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'id', { + toolbar: 'Hapus Format' +} ); diff --git a/sources/plugins/removeformat/lang/is.js b/sources/plugins/removeformat/lang/is.js new file mode 100644 index 00000000..2df2ecc0 --- /dev/null +++ b/sources/plugins/removeformat/lang/is.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'is', { + toolbar: 'Fjarlægja snið' +} ); diff --git a/sources/plugins/removeformat/lang/it.js b/sources/plugins/removeformat/lang/it.js new file mode 100644 index 00000000..97f531a4 --- /dev/null +++ b/sources/plugins/removeformat/lang/it.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'it', { + toolbar: 'Elimina formattazione' +} ); diff --git a/sources/plugins/removeformat/lang/ja.js b/sources/plugins/removeformat/lang/ja.js new file mode 100644 index 00000000..9b897f69 --- /dev/null +++ b/sources/plugins/removeformat/lang/ja.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ja', { + toolbar: '書式を解除' +} ); diff --git a/sources/plugins/removeformat/lang/ka.js b/sources/plugins/removeformat/lang/ka.js new file mode 100644 index 00000000..aa1f91ae --- /dev/null +++ b/sources/plugins/removeformat/lang/ka.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ka', { + toolbar: 'ფორმატირების მოხსნა' +} ); diff --git a/sources/plugins/removeformat/lang/km.js b/sources/plugins/removeformat/lang/km.js new file mode 100644 index 00000000..f7550dc1 --- /dev/null +++ b/sources/plugins/removeformat/lang/km.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'km', { + toolbar: 'ជម្រះ​ទ្រង់​ទ្រាយ' +} ); diff --git a/sources/plugins/removeformat/lang/ko.js b/sources/plugins/removeformat/lang/ko.js new file mode 100644 index 00000000..b19a77e9 --- /dev/null +++ b/sources/plugins/removeformat/lang/ko.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ko', { + toolbar: '형식 지우기' +} ); diff --git a/sources/plugins/removeformat/lang/ku.js b/sources/plugins/removeformat/lang/ku.js new file mode 100644 index 00000000..7471b2f8 --- /dev/null +++ b/sources/plugins/removeformat/lang/ku.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ku', { + toolbar: 'لابردنی داڕشتەکە' +} ); diff --git a/sources/plugins/removeformat/lang/lt.js b/sources/plugins/removeformat/lang/lt.js new file mode 100644 index 00000000..69666fcb --- /dev/null +++ b/sources/plugins/removeformat/lang/lt.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'lt', { + toolbar: 'Panaikinti formatą' +} ); diff --git a/sources/plugins/removeformat/lang/lv.js b/sources/plugins/removeformat/lang/lv.js new file mode 100644 index 00000000..8421e6b2 --- /dev/null +++ b/sources/plugins/removeformat/lang/lv.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'lv', { + toolbar: 'Noņemt stilus' +} ); diff --git a/sources/plugins/removeformat/lang/mk.js b/sources/plugins/removeformat/lang/mk.js new file mode 100644 index 00000000..70908a22 --- /dev/null +++ b/sources/plugins/removeformat/lang/mk.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'mk', { + toolbar: 'Remove Format' // MISSING +} ); diff --git a/sources/plugins/removeformat/lang/mn.js b/sources/plugins/removeformat/lang/mn.js new file mode 100644 index 00000000..96a7fbe4 --- /dev/null +++ b/sources/plugins/removeformat/lang/mn.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'mn', { + toolbar: 'Параргафын загварыг авч хаях' +} ); diff --git a/sources/plugins/removeformat/lang/ms.js b/sources/plugins/removeformat/lang/ms.js new file mode 100644 index 00000000..aec04ae7 --- /dev/null +++ b/sources/plugins/removeformat/lang/ms.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ms', { + toolbar: 'Buang Format' +} ); diff --git a/sources/plugins/removeformat/lang/nb.js b/sources/plugins/removeformat/lang/nb.js new file mode 100644 index 00000000..63aca263 --- /dev/null +++ b/sources/plugins/removeformat/lang/nb.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'nb', { + toolbar: 'Fjern formatering' +} ); diff --git a/sources/plugins/removeformat/lang/nl.js b/sources/plugins/removeformat/lang/nl.js new file mode 100644 index 00000000..a5775f68 --- /dev/null +++ b/sources/plugins/removeformat/lang/nl.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'nl', { + toolbar: 'Opmaak verwijderen' +} ); diff --git a/sources/plugins/removeformat/lang/no.js b/sources/plugins/removeformat/lang/no.js new file mode 100644 index 00000000..6ae98eb2 --- /dev/null +++ b/sources/plugins/removeformat/lang/no.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'no', { + toolbar: 'Fjern formatering' +} ); diff --git a/sources/plugins/removeformat/lang/pl.js b/sources/plugins/removeformat/lang/pl.js new file mode 100644 index 00000000..81442e17 --- /dev/null +++ b/sources/plugins/removeformat/lang/pl.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'pl', { + toolbar: 'Usuń formatowanie' +} ); diff --git a/sources/plugins/removeformat/lang/pt-br.js b/sources/plugins/removeformat/lang/pt-br.js new file mode 100644 index 00000000..56efddd1 --- /dev/null +++ b/sources/plugins/removeformat/lang/pt-br.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'pt-br', { + toolbar: 'Remover Formatação' +} ); diff --git a/sources/plugins/removeformat/lang/pt.js b/sources/plugins/removeformat/lang/pt.js new file mode 100644 index 00000000..4ec568b4 --- /dev/null +++ b/sources/plugins/removeformat/lang/pt.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'pt', { + toolbar: 'Eliminar Formato' +} ); diff --git a/sources/plugins/removeformat/lang/ro.js b/sources/plugins/removeformat/lang/ro.js new file mode 100644 index 00000000..4b689bbf --- /dev/null +++ b/sources/plugins/removeformat/lang/ro.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ro', { + toolbar: 'Înlătură formatarea' +} ); diff --git a/sources/plugins/removeformat/lang/ru.js b/sources/plugins/removeformat/lang/ru.js new file mode 100644 index 00000000..dcba65a8 --- /dev/null +++ b/sources/plugins/removeformat/lang/ru.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ru', { + toolbar: 'Убрать форматирование' +} ); diff --git a/sources/plugins/removeformat/lang/si.js b/sources/plugins/removeformat/lang/si.js new file mode 100644 index 00000000..e1efff63 --- /dev/null +++ b/sources/plugins/removeformat/lang/si.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'si', { + toolbar: 'සැකසීම වෙනස් කරන්න' +} ); diff --git a/sources/plugins/removeformat/lang/sk.js b/sources/plugins/removeformat/lang/sk.js new file mode 100644 index 00000000..9ce3fc30 --- /dev/null +++ b/sources/plugins/removeformat/lang/sk.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'sk', { + toolbar: 'Odstrániť formátovanie' +} ); diff --git a/sources/plugins/removeformat/lang/sl.js b/sources/plugins/removeformat/lang/sl.js new file mode 100644 index 00000000..6edc4abd --- /dev/null +++ b/sources/plugins/removeformat/lang/sl.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'sl', { + toolbar: 'Odstrani oblikovanje' +} ); diff --git a/sources/plugins/removeformat/lang/sq.js b/sources/plugins/removeformat/lang/sq.js new file mode 100644 index 00000000..7bf36689 --- /dev/null +++ b/sources/plugins/removeformat/lang/sq.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'sq', { + toolbar: 'Largo Formatin' +} ); diff --git a/sources/plugins/removeformat/lang/sr-latn.js b/sources/plugins/removeformat/lang/sr-latn.js new file mode 100644 index 00000000..8c008213 --- /dev/null +++ b/sources/plugins/removeformat/lang/sr-latn.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'sr-latn', { + toolbar: 'Ukloni formatiranje' +} ); diff --git a/sources/plugins/removeformat/lang/sr.js b/sources/plugins/removeformat/lang/sr.js new file mode 100644 index 00000000..42c78b19 --- /dev/null +++ b/sources/plugins/removeformat/lang/sr.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'sr', { + toolbar: 'Уклони форматирање' +} ); diff --git a/sources/plugins/removeformat/lang/sv.js b/sources/plugins/removeformat/lang/sv.js new file mode 100644 index 00000000..4f32fad1 --- /dev/null +++ b/sources/plugins/removeformat/lang/sv.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'sv', { + toolbar: 'Radera formatering' +} ); diff --git a/sources/plugins/removeformat/lang/th.js b/sources/plugins/removeformat/lang/th.js new file mode 100644 index 00000000..78d2d6ed --- /dev/null +++ b/sources/plugins/removeformat/lang/th.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'th', { + toolbar: 'ล้างรูปแบบ' +} ); diff --git a/sources/plugins/removeformat/lang/tr.js b/sources/plugins/removeformat/lang/tr.js new file mode 100644 index 00000000..6c63b545 --- /dev/null +++ b/sources/plugins/removeformat/lang/tr.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'tr', { + toolbar: 'Biçimi Kaldır' +} ); diff --git a/sources/plugins/removeformat/lang/tt.js b/sources/plugins/removeformat/lang/tt.js new file mode 100644 index 00000000..95206995 --- /dev/null +++ b/sources/plugins/removeformat/lang/tt.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'tt', { + toolbar: 'Форматлауны бетерү' +} ); diff --git a/sources/plugins/removeformat/lang/ug.js b/sources/plugins/removeformat/lang/ug.js new file mode 100644 index 00000000..d4664f12 --- /dev/null +++ b/sources/plugins/removeformat/lang/ug.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'ug', { + toolbar: 'پىچىمنى چىقىرىۋەت' +} ); diff --git a/sources/plugins/removeformat/lang/uk.js b/sources/plugins/removeformat/lang/uk.js new file mode 100644 index 00000000..143f69af --- /dev/null +++ b/sources/plugins/removeformat/lang/uk.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'uk', { + toolbar: 'Видалити форматування' +} ); diff --git a/sources/plugins/removeformat/lang/vi.js b/sources/plugins/removeformat/lang/vi.js new file mode 100644 index 00000000..d129e2a0 --- /dev/null +++ b/sources/plugins/removeformat/lang/vi.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'vi', { + toolbar: 'Xoá định dạng' +} ); diff --git a/sources/plugins/removeformat/lang/zh-cn.js b/sources/plugins/removeformat/lang/zh-cn.js new file mode 100644 index 00000000..762a88d7 --- /dev/null +++ b/sources/plugins/removeformat/lang/zh-cn.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'zh-cn', { + toolbar: '清除格式' +} ); diff --git a/sources/plugins/removeformat/lang/zh.js b/sources/plugins/removeformat/lang/zh.js new file mode 100644 index 00000000..d4be5286 --- /dev/null +++ b/sources/plugins/removeformat/lang/zh.js @@ -0,0 +1,7 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'removeformat', 'zh', { + toolbar: '移除格式' +} ); diff --git a/sources/plugins/removeformat/plugin.js b/sources/plugins/removeformat/plugin.js new file mode 100644 index 00000000..9a808df1 --- /dev/null +++ b/sources/plugins/removeformat/plugin.js @@ -0,0 +1,193 @@ +/** + * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +CKEDITOR.plugins.add( 'removeformat', { + // jscs:disable maximumLineLength + lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% + // jscs:enable maximumLineLength + icons: 'removeformat', // %REMOVE_LINE_CORE% + hidpi: true, // %REMOVE_LINE_CORE% + init: function( editor ) { + editor.addCommand( 'removeFormat', CKEDITOR.plugins.removeformat.commands.removeformat ); + editor.ui.addButton && editor.ui.addButton( 'RemoveFormat', { + label: editor.lang.removeformat.toolbar, + command: 'removeFormat', + toolbar: 'cleanup,10' + } ); + } +} ); + +CKEDITOR.plugins.removeformat = { + commands: { + removeformat: { + exec: function( editor ) { + var tagsRegex = editor._.removeFormatRegex || ( editor._.removeFormatRegex = new RegExp( '^(?:' + editor.config.removeFormatTags.replace( /,/g, '|' ) + ')$', 'i' ) ); + + var removeAttributes = editor._.removeAttributes || ( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) ), + filter = CKEDITOR.plugins.removeformat.filter, + ranges = editor.getSelection().getRanges(), + iterator = ranges.createIterator(), + isElement = function( element ) { + return element.type == CKEDITOR.NODE_ELEMENT; + }, + range; + + while ( ( range = iterator.getNextRange() ) ) { + if ( !range.collapsed ) + range.enlarge( CKEDITOR.ENLARGE_ELEMENT ); + + // Bookmark the range so we can re-select it after processing. + var bookmark = range.createBookmark(), + // The style will be applied within the bookmark boundaries. + startNode = bookmark.startNode, + endNode = bookmark.endNode, + currentNode; + + // We need to check the selection boundaries (bookmark spans) to break + // the code in a way that we can properly remove partially selected nodes. + // For example, removing a style from + // This is [some text to show the] problem + // ... where [ and ] represent the selection, must result: + // This is [some text to show the] problem + // The strategy is simple, we just break the partial nodes before the + // removal logic, having something that could be represented this way: + // This is [some text to show the] problem + + var breakParent = function( node ) { + // Let's start checking the start boundary. + var path = editor.elementPath( node ), + pathElements = path.elements; + + for ( var i = 1, pathElement; pathElement = pathElements[ i ]; i++ ) { + if ( pathElement.equals( path.block ) || pathElement.equals( path.blockLimit ) ) + break; + + // If this element can be removed (even partially). + if ( tagsRegex.test( pathElement.getName() ) && filter( editor, pathElement ) ) + node.breakParent( pathElement ); + } + }; + + breakParent( startNode ); + if ( endNode ) { + breakParent( endNode ); + + // Navigate through all nodes between the bookmarks. + currentNode = startNode.getNextSourceNode( true, CKEDITOR.NODE_ELEMENT ); + + while ( currentNode ) { + // If we have reached the end of the selection, stop looping. + if ( currentNode.equals( endNode ) ) + break; + + if ( currentNode.isReadOnly() ) { + // In case of non-editable we're skipping to the next sibling *elmenet*. + + // We need to be aware that endNode can be nested within current non-editable. + // This condition tests if currentNode (non-editable) contains endNode. If it does + // then we should break the filtering + if ( currentNode.getPosition( endNode ) & CKEDITOR.POSITION_CONTAINS ) { + break; + } + + currentNode = currentNode.getNext( isElement ); + continue; + } + + // Cache the next node to be processed. Do it now, because + // currentNode may be removed. + var nextNode = currentNode.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ), + isFakeElement = currentNode.getName() == 'img' && currentNode.data( 'cke-realelement' ); + + // This node must not be a fake element, and must not be read-only. + if ( !isFakeElement && filter( editor, currentNode ) ) { + // Remove elements nodes that match with this style rules. + if ( tagsRegex.test( currentNode.getName() ) ) + currentNode.remove( 1 ); + else { + currentNode.removeAttributes( removeAttributes ); + editor.fire( 'removeFormatCleanup', currentNode ); + } + } + + currentNode = nextNode; + } + } + + range.moveToBookmark( bookmark ); + } + + // The selection path may not changed, but we should force a selection + // change event to refresh command states, due to the above attribution change. (#9238) + editor.forceNextSelectionCheck(); + editor.getSelection().selectRanges( ranges ); + } + } + }, + + // Perform the remove format filters on the passed element. + // @param {CKEDITOR.editor} editor + // @param {CKEDITOR.dom.element} element + filter: function( editor, element ) { + // If editor#addRemoveFotmatFilter hasn't been executed yet value is not initialized. + var filters = editor._.removeFormatFilters || []; + for ( var i = 0; i < filters.length; i++ ) { + if ( filters[ i ]( element ) === false ) + return false; + } + return true; + } +}; + +/** + * Add to a collection of functions to decide whether a specific + * element should be considered as formatting element and thus + * could be removed during `removeFormat` command. + * + * **Note:** Only available with the existence of `removeformat` plugin. + * + * // Don't remove empty span. + * editor.addRemoveFormatFilter( function( element ) { + * return !( element.is( 'span' ) && CKEDITOR.tools.isEmpty( element.getAttributes() ) ); + * } ); + * + * @since 3.3 + * @member CKEDITOR.editor + * @param {Function} func The function to be called, which will be passed a {CKEDITOR.dom.element} element to test. + */ +CKEDITOR.editor.prototype.addRemoveFormatFilter = function( func ) { + if ( !this._.removeFormatFilters ) + this._.removeFormatFilters = []; + + this._.removeFormatFilters.push( func ); +}; + +/** + * A comma separated list of elements to be removed when executing the `remove + * format` command. Note that only inline elements are allowed. + * + * @cfg + * @member CKEDITOR.config + */ +CKEDITOR.config.removeFormatTags = 'b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var'; + +/** + * A comma separated list of elements attributes to be removed when executing + * the `remove format` command. + * + * @cfg + * @member CKEDITOR.config + */ +CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign'; + +/** + * Fired after an element was cleaned by the removeFormat plugin. + * + * @event removeFormatCleanup + * @member CKEDITOR.editor + * @param {CKEDITOR.editor} editor This editor instance. + * @param data + * @param {CKEDITOR.dom.element} data.element The element that was cleaned up. + */ -- cgit v1.2.3