Test internal D&D in the editor, dropping content from an external source (helpers, MS Word) and D&D between editors. Keep in mind that internal D&D is the most complex operation because editor have to handle two ranges at the same time.
+
Expected behavior:
+
+
proper drop position,
+
in the internal and cross editor D&D: dragged content should be removed,
+
dropped content should be (more less) the same as dragged content,
+
paste event should be fired,
+
undo should work properly (one undo operation for one D&D),
+
no crashes, nor errors,
+
+
Drag scenarios:
+
+
drag simple text,
+
drag table cell/cells,
+
drag link,
+
drag helpers textarea content,
+
drag helpers html content,
+
drag content from MS Word.
+
+
Drop scenarios:
+
+
drop in the different paragraph (before and after),
+
drop in the same paragraph (before and after),
+
drop in the same text node (before and after),
+
drop between text lines,
+
drop on the whitespace next to the header,
+
drop on the whitespace on the left side from the quote,
+
drop into a cell.
+
+
Known issues (not part of this ticket):
+
+
because of #11636 dragged content is not correct in some cases (e.g. when you drag part of the link),
+
drag position needs clean up after D&D (e.g. remove empty paragraphs, fix table),
+
drop position needs clean up after D&D (e.g. add spaces before/after dropped content, apply parents styles, break paragraph when one paragraph is dropped at the end to the other paragraph),
+
in the external D&D: Chrome add plenty of addition tags.
Apollo 11 was the spaceflight that landed the first humans, Americans Neil Armstrong and Buzz Aldrin, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.
+
+
Armstrong spent about three and a half two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5 kg) of lunar material for return to Earth. A third member of the mission, Michael Collins, piloted the command spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
+
+
Broadcasting and quotes
+
+
Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:
+
+
+
One small step for [a] man, one giant leap for mankind.
+
+
+
Apollo 11 effectively ended the Space Race and fulfilled a national goal proposed in 1961 by the late U.S. President John F. Kennedy in a speech before the United States Congress:
+
+
+
[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.
+
+
+
Technical details
+
+
+
Mission crew
+
+
+
Position
+
Astronaut
+
+
+
+
+
Commander
+
Neil A. Armstrong
+
+
+
Command Module Pilot
+
Michael Collins
+
+
+
Lunar Module Pilot
+
Edwin "Buzz" E. Aldrin, Jr.
+
+
+
+
+
Launched by a Saturn V rocket from Kennedy Space Center in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of NASA's Apollo program. The Apollo spacecraft had three parts:
+
+
+
Command Module with a cabin for the three astronauts which was the only part which landed back on Earth
+
Service Module which supported the Command Module with propulsion, electrical power, oxygen and water
+
Lunar Module for landing on the Moon.
+
+
+
After being sent to the Moon by the Saturn V's upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the Sea of Tranquility. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the Pacific Ocean on July 24.
'
+ },
+ {
+ type: 'html',
+ id: 'editing_area',
+ style: 'width:100%;height:100%',
+ html: '',
+ focus: function() {
+ var iframe = this.getInputElement(),
+ doc = iframe.getFrameDocument(),
+ body = doc.getBody();
+
+ // Frame content may not loaded at the moment.
+ if ( !body || body.isReadOnly() )
+ iframe.setCustomData( 'pendingFocus', 1 );
+ else
+ body.focus();
+ },
+ setup: function() {
+ var dialog = this.getDialog();
+ var htmlToLoad = '' +
+ '' +
+ '' +
+ '';
+
+ var src =
+ CKEDITOR.env.air ?
+ 'javascript:void(0)' : // jshint ignore:line
+ ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) ?
+ 'javascript:void((function(){' + encodeURIComponent( // jshint ignore:line
+ 'document.open();' +
+ '(' + CKEDITOR.tools.fixDomain + ')();' +
+ 'document.close();'
+ ) + '})())"'
+ : '';
+
+ var iframe = CKEDITOR.dom.element.createFromHtml( '' );
+
+ // Reset last data transfer.
+ lastDataTransfer = null;
+
+ iframe.on( 'load', function( e ) {
+ e.removeListener();
+
+ var doc = iframe.getFrameDocument();
+ doc.write( htmlToLoad );
+
+ editor.focusManager.add( doc.getBody() );
+
+ if ( CKEDITOR.env.air )
+ onPasteFrameLoad.call( this, doc.getWindow().$ );
+ }, dialog );
+
+ iframe.setCustomData( 'dialog', dialog );
+
+ var container = this.getElement();
+ container.setHtml( '' );
+ container.append( iframe );
+
+ // IE need a redirect on focus to make
+ // the cursor blinking inside iframe. (#5461)
+ if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) {
+ var focusGrabber = CKEDITOR.dom.element.createFromHtml( '' );
+ focusGrabber.on( 'focus', function() {
+ // Since fixDomain is called in src attribute,
+ // IE needs some slight delay to correctly move focus.
+ setTimeout( function() {
+ iframe.$.contentWindow.focus();
+ } );
+ } );
+ container.append( focusGrabber );
+
+ // Override focus handler on field.
+ this.focus = function() {
+ focusGrabber.focus();
+ this.fire( 'focus' );
+ };
+ }
+
+ this.getInputElement = function() {
+ return iframe;
+ };
+
+ // Force container to scale in IE.
+ if ( CKEDITOR.env.ie ) {
+ container.setStyle( 'display', 'block' );
+ container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' );
+ }
+ },
+ commit: function() {
+ var editor = this.getDialog().getParentEditor(),
+ body = this.getInputElement().getFrameDocument().getBody(),
+ bogus = body.getBogus(),
+ html;
+ bogus && bogus.remove();
+
+ // Saving the contents so changes until paste is complete will not take place (#7500)
+ html = body.getHtml();
+
+ // Opera needs some time to think about what has happened and what it should do now.
+ setTimeout( function() {
+ editor.fire( 'pasteDialogCommit', {
+ dataValue: html,
+ // Avoid error if there was no paste so lastDataTransfer is null.
+ dataTransfer: lastDataTransfer || clipboard.initPasteDataTransfer()
+ } );
+ }, 0 );
+ }
+ }
+ ]
+ } ]
+ };
+} );
+
+/**
+ * Internal event to pass paste dialog's data to the listeners.
+ *
+ * @private
+ * @event pasteDialogCommit
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ */
diff --git a/sources/plugins/clipboard/icons/copy-rtl.png b/sources/plugins/clipboard/icons/copy-rtl.png
new file mode 100644
index 0000000..ce94fc0
Binary files /dev/null and b/sources/plugins/clipboard/icons/copy-rtl.png differ
diff --git a/sources/plugins/clipboard/icons/copy.png b/sources/plugins/clipboard/icons/copy.png
new file mode 100644
index 0000000..ce94fc0
Binary files /dev/null and b/sources/plugins/clipboard/icons/copy.png differ
diff --git a/sources/plugins/clipboard/icons/cut-rtl.png b/sources/plugins/clipboard/icons/cut-rtl.png
new file mode 100644
index 0000000..8ae48d9
Binary files /dev/null and b/sources/plugins/clipboard/icons/cut-rtl.png differ
diff --git a/sources/plugins/clipboard/icons/cut.png b/sources/plugins/clipboard/icons/cut.png
new file mode 100644
index 0000000..8ae48d9
Binary files /dev/null and b/sources/plugins/clipboard/icons/cut.png differ
diff --git a/sources/plugins/clipboard/icons/hidpi/copy-rtl.png b/sources/plugins/clipboard/icons/hidpi/copy-rtl.png
new file mode 100644
index 0000000..74c6765
Binary files /dev/null and b/sources/plugins/clipboard/icons/hidpi/copy-rtl.png differ
diff --git a/sources/plugins/clipboard/icons/hidpi/copy.png b/sources/plugins/clipboard/icons/hidpi/copy.png
new file mode 100644
index 0000000..74c6765
Binary files /dev/null and b/sources/plugins/clipboard/icons/hidpi/copy.png differ
diff --git a/sources/plugins/clipboard/icons/hidpi/cut-rtl.png b/sources/plugins/clipboard/icons/hidpi/cut-rtl.png
new file mode 100644
index 0000000..f5a9b0d
Binary files /dev/null and b/sources/plugins/clipboard/icons/hidpi/cut-rtl.png differ
diff --git a/sources/plugins/clipboard/icons/hidpi/cut.png b/sources/plugins/clipboard/icons/hidpi/cut.png
new file mode 100644
index 0000000..f5a9b0d
Binary files /dev/null and b/sources/plugins/clipboard/icons/hidpi/cut.png differ
diff --git a/sources/plugins/clipboard/icons/hidpi/paste-rtl.png b/sources/plugins/clipboard/icons/hidpi/paste-rtl.png
new file mode 100644
index 0000000..12cac92
Binary files /dev/null and b/sources/plugins/clipboard/icons/hidpi/paste-rtl.png differ
diff --git a/sources/plugins/clipboard/icons/hidpi/paste.png b/sources/plugins/clipboard/icons/hidpi/paste.png
new file mode 100644
index 0000000..12cac92
Binary files /dev/null and b/sources/plugins/clipboard/icons/hidpi/paste.png differ
diff --git a/sources/plugins/clipboard/icons/paste-rtl.png b/sources/plugins/clipboard/icons/paste-rtl.png
new file mode 100644
index 0000000..7039251
Binary files /dev/null and b/sources/plugins/clipboard/icons/paste-rtl.png differ
diff --git a/sources/plugins/clipboard/icons/paste.png b/sources/plugins/clipboard/icons/paste.png
new file mode 100644
index 0000000..7039251
Binary files /dev/null and b/sources/plugins/clipboard/icons/paste.png differ
diff --git a/sources/plugins/clipboard/lang/af.js b/sources/plugins/clipboard/lang/af.js
new file mode 100644
index 0000000..f87522f
--- /dev/null
+++ b/sources/plugins/clipboard/lang/af.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'af', {
+ copy: 'Kopiëer',
+ copyError: 'U blaaier se sekuriteitsinstelling belet die kopiëringsaksie. Gebruik die sleutelbordkombinasie (Ctrl/Cmd+C).',
+ cut: 'Knip',
+ cutError: 'U blaaier se sekuriteitsinstelling belet die outomatiese knip-aksie. Gebruik die sleutelbordkombinasie (Ctrl/Cmd+X).',
+ paste: 'Plak',
+ pasteArea: 'Plak-area',
+ pasteMsg: 'Plak die teks in die volgende teks-area met die sleutelbordkombinasie (Ctrl/Cmd+V) en druk OK.',
+ securityMsg: 'Weens u blaaier se sekuriteitsinstelling is data op die knipbord nie toeganklik nie. U kan dit eers weer in hierdie venster plak.',
+ title: 'Byvoeg'
+} );
diff --git a/sources/plugins/clipboard/lang/ar.js b/sources/plugins/clipboard/lang/ar.js
new file mode 100644
index 0000000..aa96596
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ar.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ar', {
+ copy: 'نسخ',
+ copyError: 'الإعدادات الأمنية للمتصفح الذي تستخدمه تمنع عمليات النسخ التلقائي. فضلاً إستخدم لوحة المفاتيح لفعل ذلك (Ctrl/Cmd+C).',
+ cut: 'قص',
+ cutError: 'الإعدادات الأمنية للمتصفح الذي تستخدمه تمنع القص التلقائي. فضلاً إستخدم لوحة المفاتيح لفعل ذلك (Ctrl/Cmd+X).',
+ paste: 'لصق',
+ pasteArea: 'منطقة اللصق',
+ pasteMsg: 'الصق داخل الصندوق بإستخدام زرائر (Ctrl/Cmd+V) في لوحة المفاتيح، ثم اضغط زر موافق.',
+ securityMsg: 'نظراً لإعدادات الأمان الخاصة بمتصفحك، لن يتمكن هذا المحرر من الوصول لمحتوى حافظتك، لذلك يجب عليك لصق المحتوى مرة أخرى في هذه النافذة.',
+ title: 'لصق'
+} );
diff --git a/sources/plugins/clipboard/lang/az.js b/sources/plugins/clipboard/lang/az.js
new file mode 100644
index 0000000..1fc1a99
--- /dev/null
+++ b/sources/plugins/clipboard/lang/az.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'az', {
+ copy: 'Köçür',
+ copyError: 'Avtomatik köçürülməsi mümkün deyil. Ctrl+C basın.',
+ cut: 'Kəs',
+ cutError: 'Avtomatik kəsmə mümkün deyil. Ctrl+X basın.',
+ paste: 'Əlavə et',
+ pasteArea: 'Əlavəetmə sahəsi',
+ pasteMsg: 'Bu sahəyə əlavə edin (Ctrl+V)',
+ securityMsg: 'Mübadilə buferi açmaq mümkün deyil. Bu pəncərədə yenidən əlavə edin.',
+ title: 'Əlavə et'
+} );
diff --git a/sources/plugins/clipboard/lang/bg.js b/sources/plugins/clipboard/lang/bg.js
new file mode 100644
index 0000000..93a5a9c
--- /dev/null
+++ b/sources/plugins/clipboard/lang/bg.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'bg', {
+ copy: 'Копирай',
+ copyError: 'Настройките за сигурност на вашия бразуър не разрешават на редактора да изпълни запаметяването. За целта използвайте клавиатурата (Ctrl/Cmd+C).',
+ cut: 'Отрежи',
+ cutError: 'Настройките за сигурност на Вашия браузър не позволяват на редактора автоматично да изъплни действията за отрязване. Моля ползвайте клавиатурните команди за целта (ctrl+x).',
+ paste: 'Вмъкни',
+ pasteArea: 'Зона за вмъкване',
+ pasteMsg: 'Вмъкнете тук съдъжанието с клавиатуарата (Ctrl/Cmd+V) и натиснете OK.',
+ securityMsg: 'Заради настройките за сигурност на Вашия браузър, редакторът не може да прочете данните от клипборда коректно.',
+ title: 'Вмъкни'
+} );
diff --git a/sources/plugins/clipboard/lang/bn.js b/sources/plugins/clipboard/lang/bn.js
new file mode 100644
index 0000000..f821fa0
--- /dev/null
+++ b/sources/plugins/clipboard/lang/bn.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'bn', {
+ copy: 'কপি',
+ copyError: 'আপনার ব্রাউজারের নিরাপত্তা সেটিংসমূহ এডিটরকে স্বয়ংক্রিয়ভাবে কপি করার প্রক্রিয়া চালনা করার অনুমতি দেয় না। অনুগ্রহপূর্বক এই কাজের জন্য কিবোর্ড ব্যবহার করুন (Ctrl/Cmd+C)।',
+ cut: 'কাট',
+ cutError: 'আপনার ব্রাউজারের সুরক্ষা সেটিংস এডিটরকে অটোমেটিক কাট করার অনুমতি দেয়নি। দয়া করে এই কাজের জন্য কিবোর্ড ব্যবহার করুন (Ctrl/Cmd+X)।',
+ paste: 'পেস্ট',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: 'অনুগ্রহ করে নীচের বাক্সে কিবোর্ড ব্যবহার করে (Ctrl/Cmd+V) পেস্ট করুন এবং OK চাপ দিন',
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
+ title: 'পেস্ট'
+} );
diff --git a/sources/plugins/clipboard/lang/bs.js b/sources/plugins/clipboard/lang/bs.js
new file mode 100644
index 0000000..1c23a61
--- /dev/null
+++ b/sources/plugins/clipboard/lang/bs.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'bs', {
+ copy: 'Kopiraj',
+ copyError: 'Sigurnosne postavke Vašeg pretraživaèa ne dozvoljavaju operacije automatskog kopiranja. Molimo koristite kraticu na tastaturi (Ctrl/Cmd+C).',
+ cut: 'Izreži',
+ cutError: 'Sigurnosne postavke vašeg pretraživaèa ne dozvoljavaju operacije automatskog rezanja. Molimo koristite kraticu na tastaturi (Ctrl/Cmd+X).',
+ paste: 'Zalijepi',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK', // MISSING
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
+ title: 'Zalijepi'
+} );
diff --git a/sources/plugins/clipboard/lang/ca.js b/sources/plugins/clipboard/lang/ca.js
new file mode 100644
index 0000000..52179c1
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ca.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ca', {
+ copy: 'Copiar',
+ copyError: 'La configuració de seguretat del vostre navegador no permet executar automàticament les operacions de copiar. Si us plau, utilitzeu el teclat (Ctrl/Cmd+C).',
+ cut: 'Retallar',
+ cutError: 'La configuració de seguretat del vostre navegador no permet executar automàticament les operacions de retallar. Si us plau, utilitzeu el teclat (Ctrl/Cmd+X).',
+ paste: 'Enganxar',
+ pasteArea: 'Àrea d\'enganxat',
+ pasteMsg: 'Si us plau, enganxi dins del següent camp utilitzant el teclat (Ctrl/Cmd+V) i premi OK.',
+ securityMsg: 'A causa de la configuració de seguretat del vostre navegador, l\'editor no pot accedir a les dades del porta-retalls directament. Enganxeu-ho un altre cop en aquesta finestra.',
+ title: 'Enganxar'
+} );
diff --git a/sources/plugins/clipboard/lang/cs.js b/sources/plugins/clipboard/lang/cs.js
new file mode 100644
index 0000000..7cf573e
--- /dev/null
+++ b/sources/plugins/clipboard/lang/cs.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'cs', {
+ copy: 'Kopírovat',
+ copyError: 'Bezpečnostní nastavení vašeho prohlížeče nedovolují editoru spustit funkci pro kopírování zvoleného textu do schránky. Prosím zkopírujte zvolený text do schránky pomocí klávesnice (Ctrl/Cmd+C).',
+ cut: 'Vyjmout',
+ cutError: 'Bezpečnostní nastavení vašeho prohlížeče nedovolují editoru spustit funkci pro vyjmutí zvoleného textu do schránky. Prosím vyjměte zvolený text do schránky pomocí klávesnice (Ctrl/Cmd+X).',
+ paste: 'Vložit',
+ pasteArea: 'Oblast vkládání',
+ pasteMsg: 'Do následujícího pole vložte požadovaný obsah pomocí klávesnice (Ctrl/Cmd+V) a stiskněte OK.',
+ securityMsg: 'Z důvodů nastavení bezpečnosti vašeho prohlížeče nemůže editor přistupovat přímo do schránky. Obsah schránky prosím vložte znovu do tohoto okna.',
+ title: 'Vložit'
+} );
diff --git a/sources/plugins/clipboard/lang/cy.js b/sources/plugins/clipboard/lang/cy.js
new file mode 100644
index 0000000..00c5eeb
--- /dev/null
+++ b/sources/plugins/clipboard/lang/cy.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'cy', {
+ copy: 'Copïo',
+ copyError: '\'Dyw gosodiadau diogelwch eich porwr ddim yn caniatàu\'r golygydd i gynnal \'gweithredoedd copïo\' yn awtomatig. Defnyddiwch y bysellfwrdd (Ctrl/Cmd+C).',
+ cut: 'Torri',
+ cutError: 'Nid yw gosodiadau diogelwch eich porwr yn caniatàu\'r golygydd i gynnal \'gweithredoedd torri\' yn awtomatig. Defnyddiwch y bysellfwrdd (Ctrl/Cmd+X).',
+ paste: 'Gludo',
+ pasteArea: 'Ardal Gludo',
+ pasteMsg: 'Gludwch i mewn i\'r blwch canlynol gan ddefnyddio\'r bysellfwrdd (Ctrl/Cmd+V) a phwyso Iawn.',
+ securityMsg: 'Oherwydd gosodiadau diogelwch eich porwr, \'dyw\'r porwr ddim yn gallu ennill mynediad i\'r data ar y clipfwrdd yn uniongyrchol. Mae angen i chi ei ludo eto i\'r ffenestr hon.',
+ title: 'Gludo'
+} );
diff --git a/sources/plugins/clipboard/lang/da.js b/sources/plugins/clipboard/lang/da.js
new file mode 100644
index 0000000..c029016
--- /dev/null
+++ b/sources/plugins/clipboard/lang/da.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'da', {
+ copy: 'Kopiér',
+ copyError: 'Din browsers sikkerhedsindstillinger tillader ikke editoren at få automatisk adgang til udklipsholderen.
Brug i stedet tastaturet til at kopiere teksten (Ctrl/Cmd+C).',
+ cut: 'Klip',
+ cutError: 'Din browsers sikkerhedsindstillinger tillader ikke editoren at få automatisk adgang til udklipsholderen.
Brug i stedet tastaturet til at klippe teksten (Ctrl/Cmd+X).',
+ paste: 'Indsæt',
+ pasteArea: 'Indsæt område',
+ pasteMsg: 'Indsæt i feltet herunder (Ctrl/Cmd+V) og klik på OK.',
+ securityMsg: 'Din browsers sikkerhedsindstillinger tillader ikke editoren at få automatisk adgang til udklipsholderen.
Du skal indsætte udklipsholderens indhold i dette vindue igen.',
+ title: 'Indsæt'
+} );
diff --git a/sources/plugins/clipboard/lang/de-ch.js b/sources/plugins/clipboard/lang/de-ch.js
new file mode 100644
index 0000000..325b100
--- /dev/null
+++ b/sources/plugins/clipboard/lang/de-ch.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'de-ch', {
+ copy: 'Kopieren',
+ copyError: 'Die Sicherheitseinstellungen Ihres Browsers lassen es nicht zu, den Text automatisch kopieren. Bitte benutzen Sie die System-Zwischenablage über STRG-C (kopieren).',
+ cut: 'Ausschneiden',
+ cutError: 'Die Sicherheitseinstellungen Ihres Browsers lassen es nicht zu, den Text automatisch auszuschneiden. Bitte benutzen Sie die System-Zwischenablage über STRG-X (ausschneiden) und STRG-V (einfügen).',
+ paste: 'Einfügen',
+ pasteArea: 'Einfügebereich',
+ pasteMsg: 'Bitte fügen Sie den Text in der folgenden Box über die Tastatur (mit Strg+V) ein und bestätigen Sie mit OK.',
+ securityMsg: 'Aufgrund von Sicherheitsbeschränkungen Ihres Browsers kann der Editor nicht direkt auf die Zwischenablage zugreifen. Bitte fügen Sie den Inhalt erneut in diesem Fenster ein.',
+ title: 'Einfügen'
+} );
diff --git a/sources/plugins/clipboard/lang/de.js b/sources/plugins/clipboard/lang/de.js
new file mode 100644
index 0000000..2d6b30b
--- /dev/null
+++ b/sources/plugins/clipboard/lang/de.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'de', {
+ copy: 'Kopieren',
+ copyError: 'Die Sicherheitseinstellungen Ihres Browsers lassen es nicht zu, den Text automatisch kopieren. Bitte benutzen Sie die System-Zwischenablage über STRG-C (kopieren).',
+ cut: 'Ausschneiden',
+ cutError: 'Die Sicherheitseinstellungen Ihres Browsers lassen es nicht zu, den Text automatisch auszuschneiden. Bitte benutzen Sie die System-Zwischenablage über STRG-X (ausschneiden) und STRG-V (einfügen).',
+ paste: 'Einfügen',
+ pasteArea: 'Einfügebereich',
+ pasteMsg: 'Bitte fügen Sie den Text in der folgenden Box über die Tastatur (mit Strg+V) ein und bestätigen Sie mit OK.',
+ securityMsg: 'Aufgrund von Sicherheitsbeschränkungen Ihres Browsers kann der Editor nicht direkt auf die Zwischenablage zugreifen. Bitte fügen Sie den Inhalt erneut in diesem Fenster ein.',
+ title: 'Einfügen'
+} );
diff --git a/sources/plugins/clipboard/lang/el.js b/sources/plugins/clipboard/lang/el.js
new file mode 100644
index 0000000..0528840
--- /dev/null
+++ b/sources/plugins/clipboard/lang/el.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'el', {
+ copy: 'Αντιγραφή',
+ copyError: 'Οι ρυθμίσεις ασφαλείας του περιηγητή σας δεν επιτρέπουν την επιλεγμένη εργασία αντιγραφής. Παρακαλώ χρησιμοποιείστε το πληκτρολόγιο (Ctrl/Cmd+C).',
+ cut: 'Αποκοπή',
+ cutError: 'Οι ρυθμίσεις ασφαλείας του περιηγητή σας δεν επιτρέπουν την επιλεγμένη εργασία αποκοπής. Παρακαλώ χρησιμοποιείστε το πληκτρολόγιο (Ctrl/Cmd+X).',
+ paste: 'Επικόλληση',
+ pasteArea: 'Περιοχή Επικόλλησης',
+ pasteMsg: 'Παρακαλώ επικολλήστε στο ακόλουθο κουτί χρησιμοποιώντας το πληκτρολόγιο (Ctrl/Cmd+V) και πατήστε OK.',
+ securityMsg: 'Λόγων των ρυθμίσεων ασφάλειας του περιηγητή σας, ο επεξεργαστής δεν μπορεί να έχει πρόσβαση στην μνήμη επικόλλησης. Χρειάζεται να επικολλήσετε ξανά σε αυτό το παράθυρο.',
+ title: 'Επικόλληση'
+} );
diff --git a/sources/plugins/clipboard/lang/en-au.js b/sources/plugins/clipboard/lang/en-au.js
new file mode 100644
index 0000000..5c497fb
--- /dev/null
+++ b/sources/plugins/clipboard/lang/en-au.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'en-au', {
+ copy: 'Copy',
+ copyError: 'Your browser security settings don\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).',
+ cut: 'Cut',
+ cutError: 'Your browser security settings don\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).',
+ paste: 'Paste',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK',
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.',
+ title: 'Paste'
+} );
diff --git a/sources/plugins/clipboard/lang/en-ca.js b/sources/plugins/clipboard/lang/en-ca.js
new file mode 100644
index 0000000..036ebab
--- /dev/null
+++ b/sources/plugins/clipboard/lang/en-ca.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'en-ca', {
+ copy: 'Copy',
+ copyError: 'Your browser security settings don\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).',
+ cut: 'Cut',
+ cutError: 'Your browser security settings don\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).',
+ paste: 'Paste',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK',
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.',
+ title: 'Paste'
+} );
diff --git a/sources/plugins/clipboard/lang/en-gb.js b/sources/plugins/clipboard/lang/en-gb.js
new file mode 100644
index 0000000..bb511ce
--- /dev/null
+++ b/sources/plugins/clipboard/lang/en-gb.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'en-gb', {
+ copy: 'Copy',
+ copyError: 'Your browser security settings don\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).',
+ cut: 'Cut',
+ cutError: 'Your browser security settings don\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).',
+ paste: 'Paste',
+ pasteArea: 'Paste Area',
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK',
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.',
+ title: 'Paste'
+} );
diff --git a/sources/plugins/clipboard/lang/en.js b/sources/plugins/clipboard/lang/en.js
new file mode 100644
index 0000000..4db6960
--- /dev/null
+++ b/sources/plugins/clipboard/lang/en.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'en', {
+ copy: 'Copy',
+ copyError: 'Your browser security settings don\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).',
+ cut: 'Cut',
+ cutError: 'Your browser security settings don\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).',
+ paste: 'Paste',
+ pasteArea: 'Paste Area',
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK',
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.',
+ title: 'Paste'
+} );
diff --git a/sources/plugins/clipboard/lang/eo.js b/sources/plugins/clipboard/lang/eo.js
new file mode 100644
index 0000000..2df4150
--- /dev/null
+++ b/sources/plugins/clipboard/lang/eo.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'eo', {
+ copy: 'Kopii',
+ copyError: 'La sekurecagordo de via TTT-legilo ne permesas, ke la redaktilo faras kopiajn operaciojn. Bonvolu uzi la klavaron por tio (Ctrl/Cmd-C).',
+ cut: 'Eltondi',
+ cutError: 'La sekurecagordo de via TTT-legilo ne permesas, ke la redaktilo faras eltondajn operaciojn. Bonvolu uzi la klavaron por tio (Ctrl/Cmd-X).',
+ paste: 'Interglui',
+ pasteArea: 'Intergluoareo',
+ pasteMsg: 'Bonvolu glui la tekston en la jenan areon per uzado de la klavaro (Ctrl/Cmd+V) kaj premu OK',
+ securityMsg: 'Pro la sekurecagordo de via TTT-legilo, la redaktilo ne povas rekte atingi viajn datenojn en la poŝo. Bonvolu denove interglui la datenojn en tiun fenestron.',
+ title: 'Interglui'
+} );
diff --git a/sources/plugins/clipboard/lang/es.js b/sources/plugins/clipboard/lang/es.js
new file mode 100644
index 0000000..c455992
--- /dev/null
+++ b/sources/plugins/clipboard/lang/es.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'es', {
+ copy: 'Copiar',
+ copyError: 'La configuración de seguridad de este navegador no permite la ejecución automática de operaciones de copiado.\r\nPor favor use el teclado (Ctrl/Cmd+C).',
+ cut: 'Cortar',
+ cutError: 'La configuración de seguridad de este navegador no permite la ejecución automática de operaciones de cortado.\r\nPor favor use el teclado (Ctrl/Cmd+X).',
+ paste: 'Pegar',
+ pasteArea: 'Zona de pegado',
+ pasteMsg: 'Por favor pegue dentro del cuadro utilizando el teclado (Ctrl/Cmd+V);\r\nluego presione Aceptar.',
+ securityMsg: 'Debido a la configuración de seguridad de su navegador, el editor no tiene acceso al portapapeles.\r\nEs necesario que lo pegue de nuevo en esta ventana.',
+ title: 'Pegar'
+} );
diff --git a/sources/plugins/clipboard/lang/et.js b/sources/plugins/clipboard/lang/et.js
new file mode 100644
index 0000000..7d86b30
--- /dev/null
+++ b/sources/plugins/clipboard/lang/et.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'et', {
+ copy: 'Kopeeri',
+ copyError: 'Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt kopeerida. Palun kasutage selleks klaviatuuri klahvikombinatsiooni (Ctrl/Cmd+C).',
+ cut: 'Lõika',
+ cutError: 'Sinu veebisirvija turvaseaded ei luba redaktoril automaatselt lõigata. Palun kasutage selleks klaviatuuri klahvikombinatsiooni (Ctrl/Cmd+X).',
+ paste: 'Aseta',
+ pasteArea: 'Asetamise ala',
+ pasteMsg: 'Palun aseta tekst järgnevasse kasti kasutades klaviatuuri klahvikombinatsiooni (Ctrl/Cmd+V) ja vajuta seejärel OK.',
+ securityMsg: 'Sinu veebisirvija turvaseadete tõttu ei oma redaktor otsest ligipääsu lõikelaua andmetele. Sa pead asetama need uuesti siia aknasse.',
+ title: 'Asetamine'
+} );
diff --git a/sources/plugins/clipboard/lang/eu.js b/sources/plugins/clipboard/lang/eu.js
new file mode 100644
index 0000000..93240b5
--- /dev/null
+++ b/sources/plugins/clipboard/lang/eu.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'eu', {
+ copy: 'Kopiatu',
+ copyError: 'Zure web nabigatzailearen segurtasun ezarpenek ez dute baimentzen testuak automatikoki kopiatzea. Mesedez teklatua erabil ezazu (Ctrl/Cmd+C).',
+ cut: 'Ebaki',
+ cutError: 'Zure web nabigatzailearen segurtasun ezarpenek ez dute baimentzen testuak automatikoki moztea. Mesedez teklatua erabil ezazu (Ctrl/Cmd+X).',
+ paste: 'Itsatsi',
+ pasteArea: 'Itsasteko area',
+ pasteMsg: 'Mesedez teklatua erabiliz (Ctrl/Cmd+V) ondorengo eremuan testua itsatsi eta sakatu Ados.',
+ securityMsg: 'Nabigatzailearen segurtasun ezarpenak direla eta, editoreak ezin du arbela zuzenean erabili. Leiho honetan berriro itsatsi behar duzu.',
+ title: 'Itsatsi'
+} );
diff --git a/sources/plugins/clipboard/lang/fa.js b/sources/plugins/clipboard/lang/fa.js
new file mode 100644
index 0000000..8abee21
--- /dev/null
+++ b/sources/plugins/clipboard/lang/fa.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'fa', {
+ copy: 'رونوشت',
+ copyError: 'تنظیمات امنیتی مرورگر شما اجازه نمیدهد که ویرایشگر به طور خودکار عملکردهای کپی کردن را انجام دهد. لطفا با دکمههای صفحه کلید این کار را انجام دهید (Ctrl/Cmd+C).',
+ cut: 'برش',
+ cutError: 'تنظیمات امنیتی مرورگر شما اجازه نمیدهد که ویرایشگر به طور خودکار عملکردهای برش را انجام دهد. لطفا با دکمههای صفحه کلید این کار را انجام دهید (Ctrl/Cmd+X).',
+ paste: 'چسباندن',
+ pasteArea: 'محل چسباندن',
+ pasteMsg: 'لطفا متن را با کلیدهای (Ctrl/Cmd+V) در این جعبهٴ متنی بچسبانید و پذیرش را بزنید.',
+ securityMsg: 'به خاطر تنظیمات امنیتی مرورگر شما، ویرایشگر نمیتواند دسترسی مستقیم به دادههای clipboard داشته باشد. شما باید دوباره آنرا در این پنجره بچسبانید.',
+ title: 'چسباندن'
+} );
diff --git a/sources/plugins/clipboard/lang/fi.js b/sources/plugins/clipboard/lang/fi.js
new file mode 100644
index 0000000..d165fb3
--- /dev/null
+++ b/sources/plugins/clipboard/lang/fi.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'fi', {
+ copy: 'Kopioi',
+ copyError: 'Selaimesi turva-asetukset eivät salli editorin toteuttaa kopioimista. Käytä näppäimistöä kopioimiseen (Ctrl+C).',
+ cut: 'Leikkaa',
+ cutError: 'Selaimesi turva-asetukset eivät salli editorin toteuttaa leikkaamista. Käytä näppäimistöä leikkaamiseen (Ctrl+X).',
+ paste: 'Liitä',
+ pasteArea: 'Leikealue',
+ pasteMsg: 'Liitä painamalla (Ctrl+V) ja painamalla OK.',
+ securityMsg: 'Selaimesi turva-asetukset eivät salli editorin käyttää leikepöytää suoraan. Sinun pitää suorittaa liittäminen tässä ikkunassa.',
+ title: 'Liitä'
+} );
diff --git a/sources/plugins/clipboard/lang/fo.js b/sources/plugins/clipboard/lang/fo.js
new file mode 100644
index 0000000..5c1ec8a
--- /dev/null
+++ b/sources/plugins/clipboard/lang/fo.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'fo', {
+ copy: 'Avrita',
+ copyError: 'Trygdaruppseting alnótskagans forðar tekstviðgeranum í at avrita tekstin. Vinarliga nýt knappaborðið til at avrita tekstin (Ctrl/Cmd+C).',
+ cut: 'Kvett',
+ cutError: 'Trygdaruppseting alnótskagans forðar tekstviðgeranum í at kvetta tekstin. Vinarliga nýt knappaborðið til at kvetta tekstin (Ctrl/Cmd+X).',
+ paste: 'Innrita',
+ pasteArea: 'Avritingarumráði',
+ pasteMsg: 'Vinarliga koyr tekstin í hendan rútin við knappaborðinum (Ctrl/Cmd+V) og klikk á Góðtak.',
+ securityMsg: 'Trygdaruppseting alnótskagans forðar tekstviðgeranum í beinleiðis atgongd til avritingarminnið. Tygum mugu royna aftur í hesum rútinum.',
+ title: 'Innrita'
+} );
diff --git a/sources/plugins/clipboard/lang/fr-ca.js b/sources/plugins/clipboard/lang/fr-ca.js
new file mode 100644
index 0000000..3425f56
--- /dev/null
+++ b/sources/plugins/clipboard/lang/fr-ca.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'fr-ca', {
+ copy: 'Copier',
+ copyError: 'Les paramètres de sécurité de votre navigateur empêchent l\'éditeur de copier automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl/Cmd+C).',
+ cut: 'Couper',
+ cutError: 'Les paramètres de sécurité de votre navigateur empêchent l\'éditeur de couper automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl/Cmd+X).',
+ paste: 'Coller',
+ pasteArea: 'Coller la zone',
+ pasteMsg: 'Veuillez coller dans la zone ci-dessous en utilisant le clavier (Ctrl/Cmd+V) et appuyer sur OK.',
+ securityMsg: 'A cause des paramètres de sécurité de votre navigateur, l\'éditeur ne peut accéder au presse-papier directement. Vous devez coller à nouveau le contenu dans cette fenêtre.',
+ title: 'Coller'
+} );
diff --git a/sources/plugins/clipboard/lang/fr.js b/sources/plugins/clipboard/lang/fr.js
new file mode 100644
index 0000000..bb8349f
--- /dev/null
+++ b/sources/plugins/clipboard/lang/fr.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'fr', {
+ copy: 'Copier',
+ copyError: 'Les paramètres de sécurité de votre navigateur n\'autorisent pas l\'éditeur à exécuter automatiquement l\'opération « Copier ». Veuillez utiliser le raccourci clavier à cet effet (Ctrl/Cmd+C).',
+ cut: 'Couper',
+ cutError: 'Les paramètres de sécurité de votre navigateur n\'autorisent pas l\'éditeur à exécuter automatiquement l\'opération « Couper ». Veuillez utiliser le raccourci clavier à cet effet (Ctrl/Cmd+X).',
+ paste: 'Coller',
+ pasteArea: 'Coller la zone',
+ pasteMsg: 'Veuillez coller le texte dans la zone suivante en utilisant le raccourci clavier (Ctrl/Cmd+V) et cliquez sur OK.',
+ securityMsg: 'Les paramètres de sécurité de votre navigateur empêchent l\'éditeur d\'accéder directement aux données du presse-papier. Vous devez les coller à nouveau dans cette fenêtre.',
+ title: 'Coller'
+} );
diff --git a/sources/plugins/clipboard/lang/gl.js b/sources/plugins/clipboard/lang/gl.js
new file mode 100644
index 0000000..3c89dd0
--- /dev/null
+++ b/sources/plugins/clipboard/lang/gl.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'gl', {
+ copy: 'Copiar',
+ copyError: 'Os axustes de seguranza do seu navegador non permiten que o editor realice automaticamente as tarefas de copia. Use o teclado para iso (Ctrl/Cmd+C).',
+ cut: 'Cortar',
+ cutError: 'Os axustes de seguranza do seu navegador non permiten que o editor realice automaticamente as tarefas de corte. Use o teclado para iso (Ctrl/Cmd+X).',
+ paste: 'Pegar',
+ pasteArea: 'Zona de pegado',
+ pasteMsg: 'Pegue dentro do seguinte cadro usando o teclado (Ctrl/Cmd+V) e prema en Aceptar',
+ securityMsg: 'Por mor da configuración de seguranza do seu navegador, o editor non ten acceso ao portapapeis. É necesario pegalo novamente nesta xanela.',
+ title: 'Pegar'
+} );
diff --git a/sources/plugins/clipboard/lang/gu.js b/sources/plugins/clipboard/lang/gu.js
new file mode 100644
index 0000000..fcf039a
--- /dev/null
+++ b/sources/plugins/clipboard/lang/gu.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'gu', {
+ copy: 'નકલ',
+ copyError: 'તમારા બ્રાઉઝર ની સુરક્ષિત સેટિંગસ કોપી કરવાની પરવાનગી નથી આપતી. (Ctrl/Cmd+C) का प्रयोग करें।',
+ cut: 'કાપવું',
+ cutError: 'તમારા બ્રાઉઝર ની સુરક્ષિત સેટિંગસ કટ કરવાની પરવાનગી નથી આપતી. (Ctrl/Cmd+X) નો ઉપયોગ કરો.',
+ paste: 'પેસ્ટ',
+ pasteArea: 'પેસ્ટ કરવાની જગ્યા',
+ pasteMsg: 'Ctrl/Cmd+V નો પ્રયોગ કરી પેસ્ટ કરો',
+ securityMsg: 'તમારા બ્રાઉઝર ની સુરક્ષિત સેટિંગસના કારણે,એડિટર તમારા કિલ્પબોર્ડ ડેટા ને કોપી નથી કરી શકતો. તમારે આ વિન્ડોમાં ફરીથી પેસ્ટ કરવું પડશે.',
+ title: 'પેસ્ટ'
+} );
diff --git a/sources/plugins/clipboard/lang/he.js b/sources/plugins/clipboard/lang/he.js
new file mode 100644
index 0000000..a3726c3
--- /dev/null
+++ b/sources/plugins/clipboard/lang/he.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'he', {
+ copy: 'העתקה',
+ copyError: 'הגדרות האבטחה בדפדפן שלך לא מאפשרות לעורך לבצע פעולות העתקה אוטומטיות. יש להשתמש במקלדת לשם כך (Ctrl/Cmd+C).',
+ cut: 'גזירה',
+ cutError: 'הגדרות האבטחה בדפדפן שלך לא מאפשרות לעורך לבצע פעולות גזירה אוטומטיות. יש להשתמש במקלדת לשם כך (Ctrl/Cmd+X).',
+ paste: 'הדבקה',
+ pasteArea: 'איזור הדבקה',
+ pasteMsg: 'נא להדביק בתוך הקופסה באמצעות (Ctrl/Cmd+V) וללחוץ על אישור.',
+ securityMsg: 'עקב הגדרות אבטחה בדפדפן, לא ניתן לגשת אל לוח הגזירים (Clipboard) בצורה ישירה. נא להדביק שוב בחלון זה.',
+ title: 'הדבקה'
+} );
diff --git a/sources/plugins/clipboard/lang/hi.js b/sources/plugins/clipboard/lang/hi.js
new file mode 100644
index 0000000..738b0b9
--- /dev/null
+++ b/sources/plugins/clipboard/lang/hi.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'hi', {
+ copy: 'कॉपी',
+ copyError: 'आपके ब्राआउज़र की सुरक्षा सॅटिन्ग्स ने कॉपी करने की अनुमति नहीं प्रदान की है। (Ctrl/Cmd+C) का प्रयोग करें।',
+ cut: 'कट',
+ cutError: 'आपके ब्राउज़र की सुरक्षा सॅटिन्ग्स ने कट करने की अनुमति नहीं प्रदान की है। (Ctrl/Cmd+X) का प्रयोग करें।',
+ paste: 'पेस्ट',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: 'Ctrl/Cmd+V का प्रयोग करके पेस्ट करें और ठीक है करें.',
+ securityMsg: 'आपके ब्राउज़र की सुरक्षा आपके ब्राउज़र की सुरKश सैटिंग के कारण, एडिटर आपके क्लिपबोर्ड डेटा को नहीं पा सकता है. आपको उसे इस विन्डो में दोबारा पेस्ट करना होगा.',
+ title: 'पेस्ट'
+} );
diff --git a/sources/plugins/clipboard/lang/hr.js b/sources/plugins/clipboard/lang/hr.js
new file mode 100644
index 0000000..7366069
--- /dev/null
+++ b/sources/plugins/clipboard/lang/hr.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'hr', {
+ copy: 'Kopiraj',
+ copyError: 'Sigurnosne postavke Vašeg pretraživača ne dozvoljavaju operacije automatskog kopiranja. Molimo koristite kraticu na tipkovnici (Ctrl/Cmd+C).',
+ cut: 'Izreži',
+ cutError: 'Sigurnosne postavke Vašeg pretraživača ne dozvoljavaju operacije automatskog izrezivanja. Molimo koristite kraticu na tipkovnici (Ctrl/Cmd+X).',
+ paste: 'Zalijepi',
+ pasteArea: 'Prostor za ljepljenje',
+ pasteMsg: 'Molimo zaljepite unutar doljnjeg okvira koristeći tipkovnicu (Ctrl/Cmd+V) i kliknite OK.',
+ securityMsg: 'Zbog sigurnosnih postavki Vašeg pretraživača, editor nema direktan pristup Vašem međuspremniku. Potrebno je ponovno zalijepiti tekst u ovaj prozor.',
+ title: 'Zalijepi'
+} );
diff --git a/sources/plugins/clipboard/lang/hu.js b/sources/plugins/clipboard/lang/hu.js
new file mode 100644
index 0000000..b124e35
--- /dev/null
+++ b/sources/plugins/clipboard/lang/hu.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'hu', {
+ copy: 'Másolás',
+ copyError: 'A böngésző biztonsági beállításai nem engedélyezik a szerkesztőnek, hogy végrehajtsa a másolás műveletet. Használja az alábbi billentyűkombinációt (Ctrl/Cmd+X).',
+ cut: 'Kivágás',
+ cutError: 'A böngésző biztonsági beállításai nem engedélyezik a szerkesztőnek, hogy végrehajtsa a kivágás műveletet. Használja az alábbi billentyűkombinációt (Ctrl/Cmd+X).',
+ paste: 'Beillesztés',
+ pasteArea: 'Beszúrás mező',
+ pasteMsg: 'Másolja be az alábbi mezőbe a Ctrl/Cmd+V billentyűk lenyomásával, majd nyomjon Rendben-t.',
+ securityMsg: 'A böngésző biztonsági beállításai miatt a szerkesztő nem képes hozzáférni a vágólap adataihoz. Illeszd be újra ebben az ablakban.',
+ title: 'Beillesztés'
+} );
diff --git a/sources/plugins/clipboard/lang/id.js b/sources/plugins/clipboard/lang/id.js
new file mode 100644
index 0000000..e7b40ad
--- /dev/null
+++ b/sources/plugins/clipboard/lang/id.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'id', {
+ copy: 'Salin',
+ copyError: 'Pengaturan keamanan peramban anda tidak mengizinkan editor untuk mengeksekusi operasi menyalin secara otomatis. Mohon gunakan papan tuts (Ctrl/Cmd+C)',
+ cut: 'Potong',
+ cutError: 'Your browser security settings don\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).', // MISSING
+ paste: 'Tempel',
+ pasteArea: 'Area Tempel',
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK', // MISSING
+ securityMsg: 'Karena pengaturan keamanan peramban anda, editor tida dapat mengakses data clipboard anda secara langsung. Anda harus mem-paste kembali pada halaman ini',
+ title: 'Tempel'
+} );
diff --git a/sources/plugins/clipboard/lang/is.js b/sources/plugins/clipboard/lang/is.js
new file mode 100644
index 0000000..6b36cef
--- /dev/null
+++ b/sources/plugins/clipboard/lang/is.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'is', {
+ copy: 'Afrita',
+ copyError: 'Öryggisstillingar vafrans þíns leyfa ekki afritun texta með músaraðgerð. Notaðu lyklaborðið í afrita (Ctrl/Cmd+C).',
+ cut: 'Klippa',
+ cutError: 'Öryggisstillingar vafrans þíns leyfa ekki klippingu texta með músaraðgerð. Notaðu lyklaborðið í klippa (Ctrl/Cmd+X).',
+ paste: 'Líma',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: 'Límdu í svæðið hér að neðan og (Ctrl/Cmd+V) og smelltu á OK.',
+ securityMsg: 'Vegna öryggisstillinga í vafranum þínum fær ritillinn ekki beinan aðgang að klippuborðinu. Þú verður að líma innihaldið aftur inn í þennan glugga.',
+ title: 'Líma'
+} );
diff --git a/sources/plugins/clipboard/lang/it.js b/sources/plugins/clipboard/lang/it.js
new file mode 100644
index 0000000..21f8815
--- /dev/null
+++ b/sources/plugins/clipboard/lang/it.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'it', {
+ copy: 'Copia',
+ copyError: 'Le impostazioni di sicurezza del browser non permettono di copiare automaticamente il testo. Usa la tastiera (Ctrl/Cmd+C).',
+ cut: 'Taglia',
+ cutError: 'Le impostazioni di sicurezza del browser non permettono di tagliare automaticamente il testo. Usa la tastiera (Ctrl/Cmd+X).',
+ paste: 'Incolla',
+ pasteArea: 'Incolla',
+ pasteMsg: 'Incolla il testo all\'interno dell\'area sottostante usando la scorciatoia di tastiere (Ctrl/Cmd+V) e premi OK.',
+ securityMsg: 'A causa delle impostazioni di sicurezza del browser,l\'editor non è in grado di accedere direttamente agli appunti. E\' pertanto necessario incollarli di nuovo in questa finestra.',
+ title: 'Incolla'
+} );
diff --git a/sources/plugins/clipboard/lang/ja.js b/sources/plugins/clipboard/lang/ja.js
new file mode 100644
index 0000000..f099380
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ja.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ja', {
+ copy: 'コピー',
+ copyError: 'ブラウザーのセキュリティ設定によりエディタのコピー操作を自動で実行することができません。実行するには手動でキーボードの(Ctrl/Cmd+C)を使用してください。',
+ cut: '切り取り',
+ cutError: 'ブラウザーのセキュリティ設定によりエディタの切り取り操作を自動で実行することができません。実行するには手動でキーボードの(Ctrl/Cmd+X)を使用してください。',
+ paste: '貼り付け',
+ pasteArea: '貼り付け場所',
+ pasteMsg: 'キーボード(Ctrl/Cmd+V)を使用して、次の入力エリア内で貼り付けて、OKを押してください。',
+ securityMsg: 'ブラウザのセキュリティ設定により、エディタはクリップボードデータに直接アクセスすることができません。このウィンドウは貼り付け操作を行う度に表示されます。',
+ title: '貼り付け'
+} );
diff --git a/sources/plugins/clipboard/lang/ka.js b/sources/plugins/clipboard/lang/ka.js
new file mode 100644
index 0000000..e1af8cb
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ka.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ka', {
+ copy: 'ასლი',
+ copyError: 'თქვენი ბროუზერის უსაფრთხოების პარამეტრები არ იძლევა ასლის ოპერაციის ავტომატურად განხორციელების საშუალებას. გამოიყენეთ კლავიატურა ამისთვის (Ctrl/Cmd+C).',
+ cut: 'ამოჭრა',
+ cutError: 'თქვენი ბროუზერის უსაფრთხოების პარამეტრები არ იძლევა ამოჭრის ოპერაციის ავტომატურად განხორციელების საშუალებას. გამოიყენეთ კლავიატურა ამისთვის (Ctrl/Cmd+X).',
+ paste: 'ჩასმა',
+ pasteArea: 'ჩასმის არე',
+ pasteMsg: 'ჩასვით ამ არის შიგნით კლავიატურის გამოყენებით (Ctrl/Cmd+V) და დააჭირეთ OK-ს',
+ securityMsg: 'თქვენი ბროუზერის უსაფრთხოების პარამეტრები არ იძლევა clipboard-ის მონაცემების წვდომის უფლებას. კიდევ უნდა ჩასვათ ტექსტი ამ ფანჯარაში.',
+ title: 'ჩასმა'
+} );
diff --git a/sources/plugins/clipboard/lang/km.js b/sources/plugins/clipboard/lang/km.js
new file mode 100644
index 0000000..32c30cb
--- /dev/null
+++ b/sources/plugins/clipboard/lang/km.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'km', {
+ copy: 'ចម្លង',
+ copyError: 'ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះមិនអាចធ្វើកម្មវិធីតាក់តែងអត្ថបទ ចំលងអត្ថបទយកដោយស្វ័យប្រវត្តបានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនេះ (Ctrl/Cmd+C)។',
+ cut: 'កាត់យក',
+ cutError: 'ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះមិនអាចធ្វើកម្មវិធីតាក់តែងអត្ថបទ កាត់អត្ថបទយកដោយស្វ័យប្រវត្តបានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនេះ (Ctrl/Cmd+X) ។',
+ paste: 'បិទភ្ជាប់',
+ pasteArea: 'តំបន់បិទភ្ជាប់',
+ pasteMsg: 'សូមចំលងអត្ថបទទៅដាក់ក្នុងប្រអប់ដូចខាងក្រោមដោយប្រើប្រាស់ ឃី (Ctrl/Cmd+V) ហើយចុច OK ។',
+ securityMsg: 'ព្រោះតែការកំណត់សុវត្ថិភាព ប្រអប់សរសេរមិនអាចចាប់យកទិន្នន័យពីក្តារតម្បៀតខ្ទាស់អ្នកដោយផ្ទាល់បានទេ។ អ្នកត្រូវចំលងដាក់វាម្តងទៀត ក្នុងផ្ទាំងនេះ។',
+ title: 'បិទភ្ជាប់'
+} );
diff --git a/sources/plugins/clipboard/lang/ko.js b/sources/plugins/clipboard/lang/ko.js
new file mode 100644
index 0000000..0a0d1e9
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ko.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ko', {
+ copy: '복사',
+ copyError: '브라우저의 보안설정 때문에 복사할 수 없습니다. 키보드(Ctrl/Cmd+C)를 이용해서 복사하십시오.',
+ cut: '잘라내기',
+ cutError: '브라우저의 보안설정 때문에 잘라내기 기능을 실행할 수 없습니다. 키보드(Ctrl/Cmd+X)를 이용해서 잘라내기 하십시오',
+ paste: '붙여넣기',
+ pasteArea: '붙여넣기 범위',
+ pasteMsg: '키보드(Ctrl/Cmd+V)를 이용해서 상자안에 붙여넣고 확인 를 누르세요.',
+ securityMsg: '브라우저 보안 설정으로 인해, 클립보드에 직접 접근할 수 없습니다. 이 창에 다시 붙여넣기 하십시오.',
+ title: '붙여넣기'
+} );
diff --git a/sources/plugins/clipboard/lang/ku.js b/sources/plugins/clipboard/lang/ku.js
new file mode 100644
index 0000000..86e1778
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ku.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ku', {
+ copy: 'لەبەرگرتنەوە',
+ copyError: 'پارێزی وێبگەڕەکەت ڕێگەنادات بەسەرنووسەکە لە لکاندنی دەقی خۆکارارنە. تکایە لەبری ئەمە ئەم فەرمانە بەکاربهێنە بەداگرتنی کلیلی (Ctrl/Cmd+C).',
+ cut: 'بڕین',
+ cutError: 'پارێزی وێبگەڕەکەت ڕێگەنادات بە سەرنووسەکە لەبڕینی خۆکارانە. تکایە لەبری ئەمە ئەم فەرمانە بەکاربهێنە بەداگرتنی کلیلی (Ctrl/Cmd+X).',
+ paste: 'لکاندن',
+ pasteArea: 'ناوچەی لکاندن',
+ pasteMsg: 'تکایە بیلکێنە لەناوەوەی ئەم سنوقە لەڕێی تەختەکلیلەکەت بە بەکارهێنانی کلیلی (Ctrl/Cmd+V) دووای کلیکی باشە بکە.',
+ securityMsg: 'بەهۆی شێوەپێدانی پارێزی وێبگەڕەکەت، سەرنووسەکه ناتوانێت دەستبگەیەنێت بەهەڵگیراوەکە ڕاستەوخۆ. بۆیه پێویسته دووباره بیلکێنیت لەم پەنجەرەیه.',
+ title: 'لکاندن'
+} );
diff --git a/sources/plugins/clipboard/lang/lt.js b/sources/plugins/clipboard/lang/lt.js
new file mode 100644
index 0000000..86ecbbb
--- /dev/null
+++ b/sources/plugins/clipboard/lang/lt.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'lt', {
+ copy: 'Kopijuoti',
+ copyError: 'Jūsų naršyklės saugumo nustatymai neleidžia redaktoriui automatiškai įvykdyti kopijavimo operacijų. Tam prašome naudoti klaviatūrą (Ctrl/Cmd+C).',
+ cut: 'Iškirpti',
+ cutError: 'Jūsų naršyklės saugumo nustatymai neleidžia redaktoriui automatiškai įvykdyti iškirpimo operacijų. Tam prašome naudoti klaviatūrą (Ctrl/Cmd+X).',
+ paste: 'Įdėti',
+ pasteArea: 'Įkelti dalį',
+ pasteMsg: 'Žemiau esančiame įvedimo lauke įdėkite tekstą, naudodami klaviatūrą (Ctrl/Cmd+V) ir paspauskite mygtuką OK.',
+ securityMsg: 'Dėl jūsų naršyklės saugumo nustatymų, redaktorius negali tiesiogiai pasiekti laikinosios atminties. Jums reikia nukopijuoti dar kartą į šį langą.',
+ title: 'Įdėti'
+} );
diff --git a/sources/plugins/clipboard/lang/lv.js b/sources/plugins/clipboard/lang/lv.js
new file mode 100644
index 0000000..c762fc6
--- /dev/null
+++ b/sources/plugins/clipboard/lang/lv.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'lv', {
+ copy: 'Kopēt',
+ copyError: 'Jūsu pārlūkprogrammas drošības iestatījumi nepieļauj redaktoram automātiski veikt kopēšanas darbību. Lūdzu, izmantojiet (Ctrl/Cmd+C), lai veiktu šo darbību.',
+ cut: 'Izgriezt',
+ cutError: 'Jūsu pārlūkprogrammas drošības iestatījumi nepieļauj redaktoram automātiski veikt izgriezšanas darbību. Lūdzu, izmantojiet (Ctrl/Cmd+X), lai veiktu šo darbību.',
+ paste: 'Ielīmēt',
+ pasteArea: 'Ielīmēšanas zona',
+ pasteMsg: 'Lūdzu, ievietojiet tekstu šajā laukumā, izmantojot klaviatūru (Ctrl/Cmd+V) un apstipriniet ar Darīts!.',
+ securityMsg: 'Jūsu pārlūka drošības uzstādījumu dēļ, nav iespējams tieši piekļūt jūsu starpliktuvei. Jums jāielīmē atkārtoti šajā logā.',
+ title: 'Ievietot'
+} );
diff --git a/sources/plugins/clipboard/lang/mk.js b/sources/plugins/clipboard/lang/mk.js
new file mode 100644
index 0000000..eb16066
--- /dev/null
+++ b/sources/plugins/clipboard/lang/mk.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'mk', {
+ copy: 'Копирај (Copy)',
+ copyError: 'Опциите за безбедност на вашиот прелистувач не дозволуваат уредувачот автоматски да изврши копирање. Ве молиме употребете ја тастатурата. (Ctrl/Cmd+C)',
+ cut: 'Исечи (Cut)',
+ cutError: 'Опциите за безбедност на вашиот прелистувач не дозволуваат уредувачот автоматски да изврши сечење. Ве молиме употребете ја тастатурата. (Ctrl/Cmd+C)',
+ paste: 'Залепи (Paste)',
+ pasteArea: 'Простор за залепување',
+ pasteMsg: 'Ве молиме да залепите во следниот квадрат користејќи ја тастатурата (Ctrl/Cmd+V) и да притиснете OK',
+ securityMsg: 'Опциите за безбедност на вашиот прелистувач не дозволуваат уредувачот директно да пристапи до копираните податоци. Потребно е повторно да се обидете во овој прозорец.',
+ title: 'Залепи (Paste)'
+} );
diff --git a/sources/plugins/clipboard/lang/mn.js b/sources/plugins/clipboard/lang/mn.js
new file mode 100644
index 0000000..5351941
--- /dev/null
+++ b/sources/plugins/clipboard/lang/mn.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'mn', {
+ copy: 'Хуулах',
+ copyError: 'Таны browser-ын хамгаалалтын тохиргоо editor-д автоматаар хуулах үйлдэлийг зөвшөөрөхгүй байна. (Ctrl/Cmd+C) товчны хослолыг ашиглана уу.',
+ cut: 'Хайчлах',
+ cutError: 'Таны browser-ын хамгаалалтын тохиргоо editor-д автоматаар хайчлах үйлдэлийг зөвшөөрөхгүй байна. (Ctrl/Cmd+X) товчны хослолыг ашиглана уу.',
+ paste: 'Буулгах',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: '(Ctrl/Cmd+V) товчийг ашиглан paste хийнэ үү. Мөн OK дар.',
+ securityMsg: 'Таны үзүүлэгч/browser/-н хамгаалалтын тохиргооноос болоод editor clipboard өгөгдөлрүү шууд хандах боломжгүй. Энэ цонход дахин paste хийхийг оролд.',
+ title: 'Буулгах'
+} );
diff --git a/sources/plugins/clipboard/lang/ms.js b/sources/plugins/clipboard/lang/ms.js
new file mode 100644
index 0000000..3a01be4
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ms.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ms', {
+ copy: 'Salin',
+ copyError: 'Keselamatan perisian browser anda tidak membenarkan operasi salinan text/imej. Sila gunakan papan kekunci (Ctrl/Cmd+C).',
+ cut: 'Potong',
+ cutError: 'Keselamatan perisian browser anda tidak membenarkan operasi suntingan text/imej. Sila gunakan papan kekunci (Ctrl/Cmd+X).',
+ paste: 'Tampal',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK', // MISSING
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
+ title: 'Tampal'
+} );
diff --git a/sources/plugins/clipboard/lang/nb.js b/sources/plugins/clipboard/lang/nb.js
new file mode 100644
index 0000000..5355b8a
--- /dev/null
+++ b/sources/plugins/clipboard/lang/nb.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'nb', {
+ copy: 'Kopier',
+ copyError: 'Din nettlesers sikkerhetsinstillinger tillater ikke automatisk kopiering av tekst. Vennligst bruk tastatursnarveien (Ctrl/Cmd+C).',
+ cut: 'Klipp ut',
+ cutError: 'Din nettlesers sikkerhetsinstillinger tillater ikke automatisk utklipping av tekst. Vennligst bruk tastatursnarveien (Ctrl/Cmd+X).',
+ paste: 'Lim inn',
+ pasteArea: 'Innlimingsområde',
+ pasteMsg: 'Vennligst lim inn i følgende boks med tastaturet (Ctrl/Cmd+V) og trykk OK.',
+ securityMsg: 'Din nettlesers sikkerhetsinstillinger gir ikke redigeringsverktøyet direkte tilgang til utklippstavlen. Du må derfor lime det inn på nytt i dette vinduet.',
+ title: 'Lim inn'
+} );
diff --git a/sources/plugins/clipboard/lang/nl.js b/sources/plugins/clipboard/lang/nl.js
new file mode 100644
index 0000000..bae806f
--- /dev/null
+++ b/sources/plugins/clipboard/lang/nl.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'nl', {
+ copy: 'Kopiëren',
+ copyError: 'De beveiligingsinstelling van de browser verhinderen het automatisch kopiëren. Gebruik de sneltoets Ctrl/Cmd+C van het toetsenbord.',
+ cut: 'Knippen',
+ cutError: 'De beveiligingsinstelling van de browser verhinderen het automatisch knippen. Gebruik de sneltoets Ctrl/Cmd+X van het toetsenbord.',
+ paste: 'Plakken',
+ pasteArea: 'Plakgebied',
+ pasteMsg: 'Plak de tekst in het volgende vak gebruikmakend van uw toetsenbord (Ctrl/Cmd+V) en klik op OK.',
+ securityMsg: 'Door de beveiligingsinstellingen van uw browser is het niet mogelijk om direct vanuit het klembord in de editor te plakken. Middels opnieuw plakken in dit venster kunt u de tekst alsnog plakken in de editor.',
+ title: 'Plakken'
+} );
diff --git a/sources/plugins/clipboard/lang/no.js b/sources/plugins/clipboard/lang/no.js
new file mode 100644
index 0000000..e8c48da
--- /dev/null
+++ b/sources/plugins/clipboard/lang/no.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'no', {
+ copy: 'Kopier',
+ copyError: 'Din nettlesers sikkerhetsinstillinger tillater ikke automatisk kopiering av tekst. Vennligst bruk snarveien (Ctrl/Cmd+C).',
+ cut: 'Klipp ut',
+ cutError: 'Din nettlesers sikkerhetsinstillinger tillater ikke automatisk utklipping av tekst. Vennligst bruk snarveien (Ctrl/Cmd+X).',
+ paste: 'Lim inn',
+ pasteArea: 'Innlimingsområde',
+ pasteMsg: 'Vennligst lim inn i følgende boks med tastaturet (Ctrl/Cmd+V) og trykk OK.',
+ securityMsg: 'Din nettlesers sikkerhetsinstillinger gir ikke redigeringsverktøyet direkte tilgang til utklippstavlen. Du må derfor lime det inn på nytt i dette vinduet.',
+ title: 'Lim inn'
+} );
diff --git a/sources/plugins/clipboard/lang/oc.js b/sources/plugins/clipboard/lang/oc.js
new file mode 100644
index 0000000..e9e78cd
--- /dev/null
+++ b/sources/plugins/clipboard/lang/oc.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'oc', {
+ copy: 'Copiar',
+ copyError: 'Los paramètres de seguretat de vòstre navigador autorizan pas l\'editor a executar automaticament l\'operacion « Copiar ». Utilizatz l\'acorchi de clavièr a aqueste efièit (Ctrl/Cmd+C).',
+ cut: 'Talhar',
+ cutError: 'Los paramètres de seguretat de vòstre navigador autorizan pas l\'editor a executar automaticament l\'operacion « Talhar ». Utilizatz l\'acorchi de clavièr a aqueste efièit (Ctrl/Cmd+X).',
+ paste: 'Pegar',
+ pasteArea: 'Pegar la zòna',
+ pasteMsg: 'Pegatz lo tèxte dins la zòna seguenta en utilizant l\'acorchi de clavièr (Ctrl/Cmd+V) e clicatz sus D\'acòrdi.',
+ securityMsg: 'Los paramètres de seguretat de vòstre navigador empach l\'editor d\'accedir dirèctament a las donadas del quichapapièr. Las vos cal pegar tornamai dins aquesta fenèstra.',
+ title: 'Pegar'
+} );
diff --git a/sources/plugins/clipboard/lang/pl.js b/sources/plugins/clipboard/lang/pl.js
new file mode 100644
index 0000000..e2ccd16
--- /dev/null
+++ b/sources/plugins/clipboard/lang/pl.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'pl', {
+ copy: 'Kopiuj',
+ copyError: 'Ustawienia bezpieczeństwa Twojej przeglądarki nie pozwalają na automatyczne kopiowanie tekstu. Użyj skrótu klawiszowego Ctrl/Cmd+C.',
+ cut: 'Wytnij',
+ cutError: 'Ustawienia bezpieczeństwa Twojej przeglądarki nie pozwalają na automatyczne wycinanie tekstu. Użyj skrótu klawiszowego Ctrl/Cmd+X.',
+ paste: 'Wklej',
+ pasteArea: 'Obszar wklejania',
+ pasteMsg: 'Wklej tekst w poniższym polu, używając skrótu klawiaturowego (Ctrl/Cmd+V), i kliknij OK.',
+ securityMsg: 'Zabezpieczenia przeglądarki uniemożliwiają wklejenie danych bezpośrednio do edytora. Proszę ponownie wkleić dane w tym oknie.',
+ title: 'Wklej'
+} );
diff --git a/sources/plugins/clipboard/lang/pt-br.js b/sources/plugins/clipboard/lang/pt-br.js
new file mode 100644
index 0000000..74608ba
--- /dev/null
+++ b/sources/plugins/clipboard/lang/pt-br.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'pt-br', {
+ copy: 'Copiar',
+ copyError: 'As configurações de segurança do seu navegador não permitem que o editor execute operações de copiar automaticamente. Por favor, utilize o teclado para copiar (Ctrl/Cmd+C).',
+ cut: 'Recortar',
+ cutError: 'As configurações de segurança do seu navegador não permitem que o editor execute operações de recortar automaticamente. Por favor, utilize o teclado para recortar (Ctrl/Cmd+X).',
+ paste: 'Colar',
+ pasteArea: 'Área para Colar',
+ pasteMsg: 'Transfira o link usado na caixa usando o teclado com (Ctrl/Cmd+V) e OK.',
+ securityMsg: 'As configurações de segurança do seu navegador não permitem que o editor acesse os dados da área de transferência diretamente. Por favor cole o conteúdo manualmente nesta janela.',
+ title: 'Colar'
+} );
diff --git a/sources/plugins/clipboard/lang/pt.js b/sources/plugins/clipboard/lang/pt.js
new file mode 100644
index 0000000..623ce06
--- /dev/null
+++ b/sources/plugins/clipboard/lang/pt.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'pt', {
+ copy: 'Copiar',
+ copyError: 'A configuração de segurança do navegador não permite a execução automática de operações de copiar. Por favor use o teclado (Ctrl/Cmd+C).',
+ cut: 'Cortar',
+ cutError: 'A configuração de segurança do navegador não permite a execução automática de operações de cortar. Por favor use o teclado (Ctrl/Cmd+X).',
+ paste: 'Colar',
+ pasteArea: 'Colar área',
+ pasteMsg: 'Por favor, cole dentro da seguinte caixa usando o teclado (Ctrl/Cmd+V) e carregue em OK.',
+ securityMsg: 'Devido ás definições de segurança do teu browser, o editor não pode aceder ao clipboard diretamente. É necessário que voltes a colar as informações nesta janela.',
+ title: 'Colar'
+} );
diff --git a/sources/plugins/clipboard/lang/ro.js b/sources/plugins/clipboard/lang/ro.js
new file mode 100644
index 0000000..1e57798
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ro.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ro', {
+ copy: 'Copiază',
+ copyError: 'Setările de securitate ale navigatorului (browser) pe care îl folosiţi nu permit editorului să execute automat operaţiunea de copiere. Vă rugăm folosiţi tastatura (Ctrl/Cmd+C).',
+ cut: 'Taie',
+ cutError: 'Setările de securitate ale navigatorului (browser) pe care îl folosiţi nu permit editorului să execute automat operaţiunea de tăiere. Vă rugăm folosiţi tastatura (Ctrl/Cmd+X).',
+ paste: 'Adaugă',
+ pasteArea: 'Suprafața de adăugare',
+ pasteMsg: 'Vă rugăm adăugaţi în căsuţa următoare folosind tastatura (Ctrl/Cmd+V) şi apăsaţi OK',
+ securityMsg: 'Din cauza setărilor de securitate ale programului dvs. cu care navigaţi pe internet (browser), editorul nu poate accesa direct datele din clipboard. Va trebui să adăugaţi din nou datele în această fereastră.',
+ title: 'Adaugă'
+} );
diff --git a/sources/plugins/clipboard/lang/ru.js b/sources/plugins/clipboard/lang/ru.js
new file mode 100644
index 0000000..d9b4d58
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ru.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ru', {
+ copy: 'Копировать',
+ copyError: 'Настройки безопасности вашего браузера не разрешают редактору выполнять операции по копированию текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+C).',
+ cut: 'Вырезать',
+ cutError: 'Настройки безопасности вашего браузера не разрешают редактору выполнять операции по вырезке текста. Пожалуйста, используйте для этого клавиатуру (Ctrl/Cmd+X).',
+ paste: 'Вставить',
+ pasteArea: 'Зона для вставки',
+ pasteMsg: 'Пожалуйста, вставьте текст в зону ниже, используя клавиатуру (Ctrl/Cmd+V) и нажмите кнопку "OK".',
+ securityMsg: 'Настройки безопасности вашего браузера не разрешают редактору напрямую обращаться к буферу обмена. Вы должны вставить текст снова в это окно.',
+ title: 'Вставить'
+} );
diff --git a/sources/plugins/clipboard/lang/si.js b/sources/plugins/clipboard/lang/si.js
new file mode 100644
index 0000000..8430d01
--- /dev/null
+++ b/sources/plugins/clipboard/lang/si.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'si', {
+ copy: 'පිටපත් කරන්න',
+ copyError: 'Your browser security settings don\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).', // MISSING
+ cut: 'කපාගන්න',
+ cutError: 'Your browser security settings don\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).', // MISSING
+ paste: 'අලවන්න',
+ pasteArea: 'අලවන ප්රදේශ',
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK', // MISSING
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
+ title: 'අලවන්න'
+} );
diff --git a/sources/plugins/clipboard/lang/sk.js b/sources/plugins/clipboard/lang/sk.js
new file mode 100644
index 0000000..6b2b4f4
--- /dev/null
+++ b/sources/plugins/clipboard/lang/sk.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'sk', {
+ copy: 'Kopírovať',
+ copyError: 'Bezpečnostné nastavenia vášho prehliadača nedovoľujú editoru automaticky spustiť operáciu kopírovania. Použite na to klávesnicu (Ctrl/Cmd+C).',
+ cut: 'Vystrihnúť',
+ cutError: 'Bezpečnostné nastavenia vášho prehliadača nedovoľujú editoru automaticky spustiť operáciu vystrihnutia. Použite na to klávesnicu (Ctrl/Cmd+X).',
+ paste: 'Vložiť',
+ pasteArea: 'Miesto na vloženie',
+ pasteMsg: 'Použitím klávesnice (Ctrl/Cmd+V) vložte text do rámčeka a stlačte OK.',
+ securityMsg: 'Kvôli bezpečnostným nastaveniam vášho prehliadača editor nemôže pristupovať k schránke na kopírovanie priamo. Vložte to preto do tohto okna.',
+ title: 'Vložiť'
+} );
diff --git a/sources/plugins/clipboard/lang/sl.js b/sources/plugins/clipboard/lang/sl.js
new file mode 100644
index 0000000..3ddc89e
--- /dev/null
+++ b/sources/plugins/clipboard/lang/sl.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'sl', {
+ copy: 'Kopiraj',
+ copyError: 'Varnostne nastavitve brskalnika ne dopuščajo samodejnega kopiranja. Uporabite kombinacijo tipk na tipkovnici (Ctrl/Cmd+C).',
+ cut: 'Izreži',
+ cutError: 'Varnostne nastavitve brskalnika ne dopuščajo samodejnega izrezovanja. Uporabite kombinacijo tipk na tipkovnici (Ctrl/Cmd+X).',
+ paste: 'Prilepi',
+ pasteArea: 'Prilepi območje',
+ pasteMsg: 'Prosimo, prilepite v sleči okvir s pomočjo tipkovnice (Ctrl/Cmd+V) in pritisnite V redu.',
+ securityMsg: 'Zaradi varnostnih nastavitev vašega brskalnika urejevalnik ne more neposredno dostopati do odložišča. Vsebino odložišča ponovno prilepite v to okno.',
+ title: 'Prilepi'
+} );
diff --git a/sources/plugins/clipboard/lang/sq.js b/sources/plugins/clipboard/lang/sq.js
new file mode 100644
index 0000000..eda22e7
--- /dev/null
+++ b/sources/plugins/clipboard/lang/sq.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'sq', {
+ copy: 'Kopjo',
+ copyError: 'Të dhënat e sigurisë së shfletuesit tuaj nuk lejojnë që redaktuesi automatikisht të kryej veprimin e kopjimit. Ju lutemi shfrytëzoni tastierën për këtë veprim (Ctrl/Cmd+C).',
+ cut: 'Preje',
+ cutError: 'Të dhënat e sigurisë së shfletuesit tuaj nuk lejojnë që redaktuesi automatikisht të kryej veprimin e prerjes. Ju lutemi shfrytëzoni tastierën për këtë veprim (Ctrl/Cmd+X).',
+ paste: 'Hidhe',
+ pasteArea: 'Hapësira Hedhëse',
+ pasteMsg: 'Ju lutemi hidhni brenda kutizës në vijim duke shfrytëzuar tastierën (Ctrl/Cmd+V) dhe shtypni Mirë.',
+ securityMsg: 'Për shkak të dhënave të sigurisë së shfletuesit tuaj, redaktuesi nuk është në gjendje të i qaset drejtpërdrejtë të dhanve të tabelës suaj të punës. Ju duhet të hidhni atë përsëri në këtë dritare.',
+ title: 'Hidhe'
+} );
diff --git a/sources/plugins/clipboard/lang/sr-latn.js b/sources/plugins/clipboard/lang/sr-latn.js
new file mode 100644
index 0000000..52102f6
--- /dev/null
+++ b/sources/plugins/clipboard/lang/sr-latn.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'sr-latn', {
+ copy: 'Kopiraj',
+ copyError: 'Sigurnosna podešavanja Vašeg pretraživača ne dozvoljavaju operacije automatskog kopiranja teksta. Molimo Vas da koristite prečicu sa tastature (Ctrl/Cmd+C).',
+ cut: 'Iseci',
+ cutError: 'Sigurnosna podešavanja Vašeg pretraživača ne dozvoljavaju operacije automatskog isecanja teksta. Molimo Vas da koristite prečicu sa tastature (Ctrl/Cmd+X).',
+ paste: 'Zalepi',
+ pasteArea: 'Prostor za lepljenje',
+ pasteMsg: 'Molimo Vas da zalepite unutar donje povrine koristeći tastaturnu prečicu (Ctrl/Cmd+V) i da pritisnete OK.',
+ securityMsg: 'Zbog sigurnosnih postavki vašeg pregledača, editor nije u mogućnosti da direktno pristupi podacima u klipbordu. Potrebno je da zalepite još jednom u ovom prozoru.',
+ title: 'Zalepi'
+} );
diff --git a/sources/plugins/clipboard/lang/sr.js b/sources/plugins/clipboard/lang/sr.js
new file mode 100644
index 0000000..c59ff1f
--- /dev/null
+++ b/sources/plugins/clipboard/lang/sr.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'sr', {
+ copy: 'Копирај',
+ copyError: 'Сигурносна подешавања Вашег претраживача не дозвољавају операције аутоматског копирања текста. Молимо Вас да користите пречицу са тастатуре (Ctrl/Cmd+C).',
+ cut: 'Исеци',
+ cutError: 'Сигурносна подешавања Вашег претраживача не дозвољавају операције аутоматског исецања текста. Молимо Вас да користите пречицу са тастатуре (Ctrl/Cmd+X).',
+ paste: 'Залепи',
+ pasteArea: 'Залепи зону',
+ pasteMsg: 'Молимо Вас да залепите унутар доње површине користећи тастатурну пречицу (Ctrl/Cmd+V) и да притиснете OK.',
+ securityMsg: 'Због сигурносних подешавања претраживача, едитор не може да приступи оставу. Требате да га поново залепите у овом прозору.',
+ title: 'Залепи'
+} );
diff --git a/sources/plugins/clipboard/lang/sv.js b/sources/plugins/clipboard/lang/sv.js
new file mode 100644
index 0000000..9663daa
--- /dev/null
+++ b/sources/plugins/clipboard/lang/sv.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'sv', {
+ copy: 'Kopiera',
+ copyError: 'Säkerhetsinställningar i Er webbläsare tillåter inte åtgärden kopiera. Använd (Ctrl/Cmd+C) istället.',
+ cut: 'Klipp ut',
+ cutError: 'Säkerhetsinställningar i Er webbläsare tillåter inte åtgärden klipp ut. Använd (Ctrl/Cmd+X) istället.',
+ paste: 'Klistra in',
+ pasteArea: 'Paste Area',
+ pasteMsg: 'Var god och klistra in Er text i rutan nedan genom att använda (Ctrl/Cmd+V) klicka sen på OK.',
+ securityMsg: 'På grund av din webbläsares säkerhetsinställningar kan verktyget inte få åtkomst till urklippsdatan. Var god och använd detta fönster istället.',
+ title: 'Klistra in'
+} );
diff --git a/sources/plugins/clipboard/lang/th.js b/sources/plugins/clipboard/lang/th.js
new file mode 100644
index 0000000..29664a6
--- /dev/null
+++ b/sources/plugins/clipboard/lang/th.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'th', {
+ copy: 'สำเนา',
+ copyError: 'ไม่สามารถสำเนาข้อความที่เลือกไว้ได้เนื่องจากการกำหนดค่าระดับความปลอดภัย. กรุณาใช้ปุ่มลัดเพื่อวางข้อความแทน (กดปุ่ม Ctrl/Cmd และตัว C พร้อมกัน).',
+ cut: 'ตัด',
+ cutError: 'ไม่สามารถตัดข้อความที่เลือกไว้ได้เนื่องจากการกำหนดค่าระดับความปลอดภัย. กรุณาใช้ปุ่มลัดเพื่อวางข้อความแทน (กดปุ่ม Ctrl/Cmd และตัว X พร้อมกัน).',
+ paste: 'วาง',
+ pasteArea: 'Paste Area', // MISSING
+ pasteMsg: 'กรุณาใช้คีย์บอร์ดเท่านั้น โดยกดปุ๋ม (Ctrl/Cmd และ V)พร้อมๆกัน และกด OK.',
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
+ title: 'วาง'
+} );
diff --git a/sources/plugins/clipboard/lang/tr.js b/sources/plugins/clipboard/lang/tr.js
new file mode 100644
index 0000000..a60ddc7
--- /dev/null
+++ b/sources/plugins/clipboard/lang/tr.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'tr', {
+ copy: 'Kopyala',
+ copyError: 'Gezgin yazılımınızın güvenlik ayarları düzenleyicinin otomatik kopyalama işlemine izin vermiyor. İşlem için (Ctrl/Cmd+C) tuşlarını kullanın.',
+ cut: 'Kes',
+ cutError: 'Gezgin yazılımınızın güvenlik ayarları düzenleyicinin otomatik kesme işlemine izin vermiyor. İşlem için (Ctrl/Cmd+X) tuşlarını kullanın.',
+ paste: 'Yapıştır',
+ pasteArea: 'Yapıştırma Alanı',
+ pasteMsg: 'Lütfen aşağıdaki kutunun içine yapıştırın. (Ctrl/Cmd+V) ve Tamam butonunu tıklayın.',
+ securityMsg: 'Gezgin yazılımınızın güvenlik ayarları düzenleyicinin direkt olarak panoya erişimine izin vermiyor. Bu pencere içine tekrar yapıştırmalısınız..',
+ title: 'Yapıştır'
+} );
diff --git a/sources/plugins/clipboard/lang/tt.js b/sources/plugins/clipboard/lang/tt.js
new file mode 100644
index 0000000..e4b0537
--- /dev/null
+++ b/sources/plugins/clipboard/lang/tt.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'tt', {
+ copy: 'Күчермәләү',
+ copyError: 'Браузерыгызның иминлек үзлекләре автоматик рәвештә күчермәләү үтәүне тыя. Тиз төймәләрне (Ctrl/Cmd+C) кулланыгыз.',
+ cut: 'Кисеп алу',
+ cutError: 'Браузерыгызның иминлек үзлекләре автоматик рәвештә күчермәләү үтәүне тыя. Тиз төймәләрне (Ctrl/Cmd+C) кулланыгыз.',
+ paste: 'Өстәү',
+ pasteArea: 'Өстәү мәйданы',
+ pasteMsg: 'Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK', // MISSING
+ securityMsg: 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
+ title: 'Өстәү'
+} );
diff --git a/sources/plugins/clipboard/lang/ug.js b/sources/plugins/clipboard/lang/ug.js
new file mode 100644
index 0000000..dcdf29c
--- /dev/null
+++ b/sources/plugins/clipboard/lang/ug.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'ug', {
+ copy: 'كۆچۈر',
+ copyError: 'تور كۆرگۈڭىزنىڭ بىخەتەرلىك تەڭشىكى تەھرىرلىگۈچنىڭ كۆچۈر مەشغۇلاتىنى ئۆزلۈكىدىن ئىجرا قىلىشىغا يول قويمايدۇ، ھەرپتاختا تېز كۇنۇپكا (Ctrl/Cmd+C) ئارقىلىق تاماملاڭ',
+ cut: 'كەس',
+ cutError: 'تور كۆرگۈڭىزنىڭ بىخەتەرلىك تەڭشىكى تەھرىرلىگۈچنىڭ كەس مەشغۇلاتىنى ئۆزلۈكىدىن ئىجرا قىلىشىغا يول قويمايدۇ، ھەرپتاختا تېز كۇنۇپكا (Ctrl/Cmd+X) ئارقىلىق تاماملاڭ',
+ paste: 'چاپلا',
+ pasteArea: 'چاپلاش دائىرىسى',
+ pasteMsg: 'ھەرپتاختا تېز كۇنۇپكا (Ctrl/Cmd+V) نى ئىشلىتىپ مەزمۇننى تۆۋەندىكى رامكىغا كۆچۈرۈڭ، ئاندىن جەزملەنى بېسىڭ',
+ securityMsg: 'توركۆرگۈڭىزنىڭ بىخەتەرلىك تەڭشىكى سەۋەبىدىن بۇ تەھرىرلىگۈچ چاپلاش تاختىسىدىكى مەزمۇننى بىۋاستە زىيارەت قىلالمايدۇ، بۇ كۆزنەكتە قايتا بىر قېتىم چاپلىشىڭىز كېرەك.',
+ title: 'چاپلا'
+} );
diff --git a/sources/plugins/clipboard/lang/uk.js b/sources/plugins/clipboard/lang/uk.js
new file mode 100644
index 0000000..242688f
--- /dev/null
+++ b/sources/plugins/clipboard/lang/uk.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'uk', {
+ copy: 'Копіювати',
+ copyError: 'Налаштування безпеки Вашого браузера не дозволяють редактору автоматично виконувати операції копіювання. Будь ласка, використовуйте клавіатуру для цього (Ctrl/Cmd+C).',
+ cut: 'Вирізати',
+ cutError: 'Налаштування безпеки Вашого браузера не дозволяють редактору автоматично виконувати операції вирізування. Будь ласка, використовуйте клавіатуру для цього (Ctrl/Cmd+X)',
+ paste: 'Вставити',
+ pasteArea: 'Область вставки',
+ pasteMsg: 'Будь ласка, вставте інформацію з буфера обміну в цю область, користуючись комбінацією клавіш (Ctrl/Cmd+V), та натисніть OK.',
+ securityMsg: 'Редактор не може отримати прямий доступ до буферу обміну у зв\'язку з налаштуваннями Вашого браузера. Вам потрібно вставити інформацію в це вікно.',
+ title: 'Вставити'
+} );
diff --git a/sources/plugins/clipboard/lang/vi.js b/sources/plugins/clipboard/lang/vi.js
new file mode 100644
index 0000000..fd36e1f
--- /dev/null
+++ b/sources/plugins/clipboard/lang/vi.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'vi', {
+ copy: 'Sao chép',
+ copyError: 'Các thiết lập bảo mật của trình duyệt không cho phép trình biên tập tự động thực thi lệnh sao chép. Hãy sử dụng bàn phím cho lệnh này (Ctrl/Cmd+C).',
+ cut: 'Cắt',
+ cutError: 'Các thiết lập bảo mật của trình duyệt không cho phép trình biên tập tự động thực thi lệnh cắt. Hãy sử dụng bàn phím cho lệnh này (Ctrl/Cmd+X).',
+ paste: 'Dán',
+ pasteArea: 'Khu vực dán',
+ pasteMsg: 'Hãy dán nội dung vào trong khung bên dưới, sử dụng tổ hợp phím (Ctrl/Cmd+V) và nhấn vào nút Đồng ý.',
+ securityMsg: 'Do thiết lập bảo mật của trình duyệt nên trình biên tập không thể truy cập trực tiếp vào nội dung đã sao chép. Bạn cần phải dán lại nội dung vào cửa sổ này.',
+ title: 'Dán'
+} );
diff --git a/sources/plugins/clipboard/lang/zh-cn.js b/sources/plugins/clipboard/lang/zh-cn.js
new file mode 100644
index 0000000..930f24e
--- /dev/null
+++ b/sources/plugins/clipboard/lang/zh-cn.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'zh-cn', {
+ copy: '复制',
+ copyError: '您的浏览器安全设置不允许编辑器自动执行复制操作,请使用键盘快捷键(Ctrl/Cmd+C)来完成。',
+ cut: '剪切',
+ cutError: '您的浏览器安全设置不允许编辑器自动执行剪切操作,请使用键盘快捷键(Ctrl/Cmd+X)来完成。',
+ paste: '粘贴',
+ pasteArea: '粘贴区域',
+ pasteMsg: '请使用键盘快捷键(Ctrl/Cmd+V)把内容粘贴到下面的方框里,再按 确定',
+ securityMsg: '因为您的浏览器的安全设置原因,本编辑器不能直接访问您的剪贴板内容,你需要在本窗口重新粘贴一次。',
+ title: '粘贴'
+} );
diff --git a/sources/plugins/clipboard/lang/zh.js b/sources/plugins/clipboard/lang/zh.js
new file mode 100644
index 0000000..33a4ef0
--- /dev/null
+++ b/sources/plugins/clipboard/lang/zh.js
@@ -0,0 +1,15 @@
+/*
+Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.md or http://ckeditor.com/license
+*/
+CKEDITOR.plugins.setLang( 'clipboard', 'zh', {
+ copy: '複製',
+ copyError: '瀏覽器的安全性設定不允許編輯器自動執行複製動作。請使用鍵盤快捷鍵 (Ctrl/Cmd+C) 複製。',
+ cut: '剪下',
+ cutError: '瀏覽器的安全性設定不允許編輯器自動執行剪下動作。請使用鏐盤快捷鍵 (Ctrl/Cmd+X) 剪下。',
+ paste: '貼上',
+ pasteArea: '貼上區',
+ pasteMsg: '請使用鍵盤快捷鍵 (Ctrl/Cmd+V) 貼到下方區域中並按下「確定」。',
+ securityMsg: '因為瀏覽器的安全性設定,本編輯器無法直接存取您的剪貼簿資料,請您自行在本視窗進行貼上動作。',
+ title: '貼上'
+} );
diff --git a/sources/plugins/clipboard/plugin.js b/sources/plugins/clipboard/plugin.js
new file mode 100644
index 0000000..5c387b3
--- /dev/null
+++ b/sources/plugins/clipboard/plugin.js
@@ -0,0 +1,2772 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md or http://ckeditor.com/license
+ */
+
+/**
+ * @ignore
+ * File overview: Clipboard support.
+ */
+
+//
+// COPY & PASTE EXECUTION FLOWS:
+// -- CTRL+C
+// * if ( isCustomCopyCutSupported )
+// * dataTransfer.setData( 'text/html', getSelectedHtml )
+// * else
+// * browser's default behavior
+// -- CTRL+X
+// * listen onKey (onkeydown)
+// * fire 'saveSnapshot' on editor
+// * if ( isCustomCopyCutSupported )
+// * dataTransfer.setData( 'text/html', getSelectedHtml )
+// * extractSelectedHtml // remove selected contents
+// * else
+// * browser's default behavior
+// * deferred second 'saveSnapshot' event
+// -- CTRL+V
+// * listen onKey (onkeydown)
+// * simulate 'beforepaste' for non-IEs on editable
+// * listen 'onpaste' on editable ('onbeforepaste' for IE)
+// * fire 'beforePaste' on editor
+// * if ( !canceled && ( htmlInDataTransfer || !external paste) && dataTransfer is not empty ) getClipboardDataByPastebin
+// * fire 'paste' on editor
+// * !canceled && fire 'afterPaste' on editor
+// -- Copy command
+// * tryToCutCopy
+// * execCommand
+// * !success && notification
+// -- Cut command
+// * fixCut
+// * tryToCutCopy
+// * execCommand
+// * !success && notification
+// -- Paste command
+// * fire 'paste' on editable ('beforepaste' for IE)
+// * !canceled && execCommand 'paste'
+// * !success && fire 'pasteDialog' on editor
+// -- Paste from native context menu & menubar
+// (Fx & Webkits are handled in 'paste' default listener.
+// Opera cannot be handled at all because it doesn't fire any events
+// Special treatment is needed for IE, for which is this part of doc)
+// * listen 'onpaste'
+// * cancel native event
+// * fire 'beforePaste' on editor
+// * if ( !canceled && ( htmlInDataTransfer || !external paste) && dataTransfer is not empty ) getClipboardDataByPastebin
+// * execIECommand( 'paste' ) -> this fires another 'paste' event, so cancel it
+// * fire 'paste' on editor
+// * !canceled && fire 'afterPaste' on editor
+//
+//
+// PASTE EVENT - PREPROCESSING:
+// -- Possible dataValue types: auto, text, html.
+// -- Possible dataValue contents:
+// * text (possible \n\r)
+// * htmlified text (text + br,div,p - no presentational markup & attrs - depends on browser)
+// * html
+// -- Possible flags:
+// * htmlified - if true then content is a HTML even if no markup inside. This flag is set
+// for content from editable pastebins, because they 'htmlify' pasted content.
+//
+// -- Type: auto:
+// * content: htmlified text -> filter, unify text markup (brs, ps, divs), set type: text
+// * content: html -> filter, set type: html
+// -- Type: text:
+// * content: htmlified text -> filter, unify text markup
+// * content: html -> filter, strip presentational markup, unify text markup
+// -- Type: html:
+// * content: htmlified text -> filter, unify text markup
+// * content: html -> filter
+//
+// -- Phases:
+// * if dataValue is empty copy data from dataTransfer to dataValue (priority 1)
+// * filtering (priorities 3-5) - e.g. pastefromword filters
+// * content type sniffing (priority 6)
+// * markup transformations for text (priority 6)
+//
+// DRAG & DROP EXECUTION FLOWS:
+// -- Drag
+// * save to the global object:
+// * drag timestamp (with 'cke-' prefix),
+// * selected html,
+// * drag range,
+// * editor instance.
+// * put drag timestamp into event.dataTransfer.text
+// -- Drop
+// * if events text == saved timestamp && editor == saved editor
+// internal drag & drop occurred
+// * getRangeAtDropPosition
+// * create bookmarks for drag and drop ranges starting from the end of the document
+// * dragRange.deleteContents()
+// * fire 'paste' with saved html and drop range
+// * if events text == saved timestamp && editor != saved editor
+// cross editor drag & drop occurred
+// * getRangeAtDropPosition
+// * fire 'paste' with saved html
+// * dragRange.deleteContents()
+// * FF: refreshCursor on afterPaste
+// * if events text != saved timestamp
+// drop form external source occurred
+// * getRangeAtDropPosition
+// * if event contains html data then fire 'paste' with html
+// * else if event contains text data then fire 'paste' with encoded text
+// * FF: refreshCursor on afterPaste
+
+'use strict';
+
+( function() {
+ // Register the plugin.
+ CKEDITOR.plugins.add( 'clipboard', {
+ requires: 'dialog',
+ // jscs:disable maximumLineLength
+ lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,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,oc,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: 'copy,copy-rtl,cut,cut-rtl,paste,paste-rtl', // %REMOVE_LINE_CORE%
+ hidpi: true, // %REMOVE_LINE_CORE%
+ init: function( editor ) {
+ var filterType,
+ filtersFactory = filtersFactoryFactory();
+
+ if ( editor.config.forcePasteAsPlainText ) {
+ filterType = 'plain-text';
+ } else if ( editor.config.pasteFilter ) {
+ filterType = editor.config.pasteFilter;
+ }
+ // On Webkit the pasteFilter defaults 'semantic-content' because pasted data is so terrible
+ // that it must be always filtered.
+ else if ( CKEDITOR.env.webkit && !( 'pasteFilter' in editor.config ) ) {
+ filterType = 'semantic-content';
+ }
+
+ editor.pasteFilter = filtersFactory.get( filterType );
+
+ initPasteClipboard( editor );
+ initDragDrop( editor );
+
+ CKEDITOR.dialog.add( 'paste', CKEDITOR.getUrl( this.path + 'dialogs/paste.js' ) );
+
+ // Convert image file (if present) to base64 string for Firefox. Do it as the first
+ // step as the conversion is asynchronous and should hold all further paste processing.
+ if ( CKEDITOR.env.gecko ) {
+ var supportedImageTypes = [ 'image/png', 'image/jpeg', 'image/gif' ],
+ latestId;
+
+ editor.on( 'paste', function( evt ) {
+ var dataObj = evt.data,
+ data = dataObj.dataValue,
+ dataTransfer = dataObj.dataTransfer;
+
+ // If data empty check for image content inside data transfer. #16705
+ if ( !data && dataObj.method == 'paste' && dataTransfer && dataTransfer.getFilesCount() == 1 && latestId != dataTransfer.id ) {
+ var file = dataTransfer.getFile( 0 );
+
+ if ( CKEDITOR.tools.indexOf( supportedImageTypes, file.type ) != -1 ) {
+ var fileReader = new FileReader();
+
+ // Convert image file to img tag with base64 image.
+ fileReader.addEventListener( 'load', function() {
+ evt.data.dataValue = '';
+ editor.fire( 'paste', evt.data );
+ }, false );
+
+ // Proceed with normal flow if reading file was aborted.
+ fileReader.addEventListener( 'abort', function() {
+ editor.fire( 'paste', evt.data );
+ }, false );
+
+ // Proceed with normal flow if reading file failed.
+ fileReader.addEventListener( 'error', function() {
+ editor.fire( 'paste', evt.data );
+ }, false );
+
+ fileReader.readAsDataURL( file );
+
+ latestId = dataObj.dataTransfer.id;
+
+ evt.stop();
+ }
+ }
+ }, null, null, 1 );
+ }
+
+ editor.on( 'paste', function( evt ) {
+ // Init `dataTransfer` if `paste` event was fired without it, so it will be always available.
+ if ( !evt.data.dataTransfer ) {
+ evt.data.dataTransfer = new CKEDITOR.plugins.clipboard.dataTransfer();
+ }
+
+ // If dataValue is already set (manually or by paste bin), so do not override it.
+ if ( evt.data.dataValue ) {
+ return;
+ }
+
+ var dataTransfer = evt.data.dataTransfer,
+ // IE support only text data and throws exception if we try to get html data.
+ // This html data object may also be empty if we drag content of the textarea.
+ value = dataTransfer.getData( 'text/html' );
+
+ if ( value ) {
+ evt.data.dataValue = value;
+ evt.data.type = 'html';
+ } else {
+ // Try to get text data otherwise.
+ value = dataTransfer.getData( 'text/plain' );
+
+ if ( value ) {
+ evt.data.dataValue = editor.editable().transformPlainTextToHtml( value );
+ evt.data.type = 'text';
+ }
+ }
+ }, null, null, 1 );
+
+ editor.on( 'paste', function( evt ) {
+ var data = evt.data.dataValue,
+ blockElements = CKEDITOR.dtd.$block;
+
+ // Filter webkit garbage.
+ if ( data.indexOf( 'Apple-' ) > -1 ) {
+ // Replace special webkit's with simple space, because webkit
+ // produces them even for normal spaces.
+ data = data.replace( / <\/span>/gi, ' ' );
+
+ // Strip around white-spaces when not in forced 'html' content type.
+ // This spans are created only when pasting plain text into Webkit,
+ // but for safety reasons remove them always.
+ if ( evt.data.type != 'html' ) {
+ data = data.replace( /]*>([^<]*)<\/span>/gi, function( all, spaces ) {
+ // Replace tabs with 4 spaces like Fx does.
+ return spaces.replace( /\t/g, ' ' );
+ } );
+ }
+
+ // This br is produced only when copying & pasting HTML content.
+ if ( data.indexOf( ' ' ) > -1 ) {
+ evt.data.startsWithEOL = 1;
+ evt.data.preSniffing = 'html'; // Mark as not text.
+ data = data.replace( / /, '' );
+ }
+
+ // Remove all other classes.
+ data = data.replace( /(<[^>]+) class="Apple-[^"]*"/gi, '$1' );
+ }
+
+ // Strip editable that was copied from inside. (#9534)
+ if ( data.match( /^<[^<]+cke_(editable|contents)/i ) ) {
+ var tmp,
+ editable_wrapper,
+ wrapper = new CKEDITOR.dom.element( 'div' );
+
+ wrapper.setHtml( data );
+ // Verify for sure and check for nested editor UI parts. (#9675)
+ while ( wrapper.getChildCount() == 1 &&
+ ( tmp = wrapper.getFirst() ) &&
+ tmp.type == CKEDITOR.NODE_ELEMENT && // Make sure first-child is element.
+ ( tmp.hasClass( 'cke_editable' ) || tmp.hasClass( 'cke_contents' ) ) ) {
+ wrapper = editable_wrapper = tmp;
+ }
+
+ // If editable wrapper was found strip it and bogus (added on FF).
+ if ( editable_wrapper )
+ data = editable_wrapper.getHtml().replace( / $/i, '' );
+ }
+
+ if ( CKEDITOR.env.ie ) {
+ //
->
(br.cke-pasted-remove will be removed later)
+ data = data.replace( /^ (?: |\r\n)?<(\w+)/g, function( match, elementName ) {
+ if ( elementName.toLowerCase() in blockElements ) {
+ evt.data.preSniffing = 'html'; // Mark as not a text.
+ return '<' + elementName;
+ }
+ return match;
+ } );
+ } else if ( CKEDITOR.env.webkit ) {
+ //
->
+ // We don't mark br, because this situation can happen for htmlified text too.
+ data = data.replace( /<\/(\w+)>
<\/div>$/, function( match, elementName ) {
+ if ( elementName in blockElements ) {
+ evt.data.endsWithEOL = 1;
+ return '' + elementName + '>';
+ }
+ return match;
+ } );
+ } else if ( CKEDITOR.env.gecko ) {
+ // Firefox adds bogus when user pasted text followed by space(s).
+ data = data.replace( /(\s) $/, '$1' );
+ }
+
+ evt.data.dataValue = data;
+ }, null, null, 3 );
+
+ editor.on( 'paste', function( evt ) {
+ var dataObj = evt.data,
+ type = dataObj.type,
+ data = dataObj.dataValue,
+ trueType,
+ // Default is 'html'.
+ defaultType = editor.config.clipboard_defaultContentType || 'html',
+ transferType = dataObj.dataTransfer.getTransferType( editor );
+
+ // If forced type is 'html' we don't need to know true data type.
+ if ( type == 'html' || dataObj.preSniffing == 'html' ) {
+ trueType = 'html';
+ } else {
+ trueType = recogniseContentType( data );
+ }
+
+ // Unify text markup.
+ if ( trueType == 'htmlifiedtext' ) {
+ data = htmlifiedTextHtmlification( editor.config, data );
+ }
+
+ // Strip presentational markup & unify text markup.
+ // Forced plain text (dialog or forcePAPT).
+ // Note: we do not check dontFilter option in this case, because forcePAPT was implemented
+ // before pasteFilter and pasteFilter is automatically used on Webkit&Blink since 4.5, so
+ // forcePAPT should have priority as it had before 4.5.
+ if ( type == 'text' && trueType == 'html' ) {
+ data = filterContent( editor, data, filtersFactory.get( 'plain-text' ) );
+ }
+ // External paste and pasteFilter exists and filtering isn't disabled.
+ else if ( transferType == CKEDITOR.DATA_TRANSFER_EXTERNAL && editor.pasteFilter && !dataObj.dontFilter ) {
+ data = filterContent( editor, data, editor.pasteFilter );
+ }
+
+ if ( dataObj.startsWithEOL ) {
+ data = ' ' + data;
+ }
+ if ( dataObj.endsWithEOL ) {
+ data += ' ';
+ }
+
+ if ( type == 'auto' ) {
+ type = ( trueType == 'html' || defaultType == 'html' ) ? 'html' : 'text';
+ }
+
+ dataObj.type = type;
+ dataObj.dataValue = data;
+ delete dataObj.preSniffing;
+ delete dataObj.startsWithEOL;
+ delete dataObj.endsWithEOL;
+ }, null, null, 6 );
+
+ // Inserts processed data into the editor at the end of the
+ // events chain.
+ editor.on( 'paste', function( evt ) {
+ var data = evt.data;
+
+ if ( data.dataValue ) {
+ editor.insertHtml( data.dataValue, data.type, data.range );
+
+ // Defer 'afterPaste' so all other listeners for 'paste' will be fired first.
+ // Fire afterPaste only if paste inserted some HTML.
+ setTimeout( function() {
+ editor.fire( 'afterPaste' );
+ }, 0 );
+ }
+ }, null, null, 1000 );
+
+ editor.on( 'pasteDialog', function( evt ) {
+ // TODO it's possible that this setTimeout is not needed any more,
+ // because of changes introduced in the same commit as this comment.
+ // Editor.getClipboardData adds listener to the dialog's events which are
+ // fired after a while (not like 'showDialog').
+ setTimeout( function() {
+ // Open default paste dialog.
+ editor.openDialog( 'paste', evt.data );
+ }, 0 );
+ } );
+ }
+ } );
+
+ function firePasteEvents( editor, data, withBeforePaste ) {
+ if ( !data.type ) {
+ data.type = 'auto';
+ }
+
+ if ( withBeforePaste ) {
+ // Fire 'beforePaste' event so clipboard flavor get customized
+ // by other plugins.
+ if ( editor.fire( 'beforePaste', data ) === false )
+ return false; // Event canceled
+ }
+
+ // Do not fire paste if there is no data (dataValue and dataTranfser are empty).
+ // This check should be done after firing 'beforePaste' because for native paste
+ // 'beforePaste' is by default fired even for empty clipboard.
+ if ( !data.dataValue && data.dataTransfer.isEmpty() ) {
+ return false;
+ }
+
+ if ( !data.dataValue ) {
+ data.dataValue = '';
+ }
+
+ // Because of FF bug we need to use this hack, otherwise cursor is hidden
+ // or it is not possible to move it (#12420).
+ // Also, check that editor.toolbox exists, because the toolbar plugin might not be loaded (#13305).
+ if ( CKEDITOR.env.gecko && data.method == 'drop' && editor.toolbox ) {
+ editor.once( 'afterPaste', function() {
+ editor.toolbox.focus();
+ } );
+ }
+
+ return editor.fire( 'paste', data );
+ }
+
+ function initPasteClipboard( editor ) {
+ var clipboard = CKEDITOR.plugins.clipboard,
+ preventBeforePasteEvent = 0,
+ preventPasteEvent = 0,
+ inReadOnly = 0;
+
+ addListeners();
+ addButtonsCommands();
+
+ /**
+ * Gets clipboard data by directly accessing the clipboard (IE only) or opening the paste dialog window.
+ *
+ * editor.getClipboardData( { title: 'Get my data' }, function( data ) {
+ * if ( data )
+ * alert( data.type + ' ' + data.dataValue );
+ * } );
+ *
+ * @member CKEDITOR.editor
+ * @param {Object} options
+ * @param {String} [options.title] The title of the paste dialog window.
+ * @param {Function} callback A function that will be executed with `data.type` and `data.dataValue`
+ * or `null` if none of the capturing methods succeeded.
+ */
+ editor.getClipboardData = function( options, callback ) {
+ var beforePasteNotCanceled = false,
+ dataType = 'auto',
+ dialogCommited = false;
+
+ // Options are optional - args shift.
+ if ( !callback ) {
+ callback = options;
+ options = null;
+ }
+
+ // Listen with maximum priority to handle content before everyone else.
+ // This callback will handle paste event that will be fired if direct
+ // access to the clipboard succeed in IE.
+ editor.on( 'paste', onPaste, null, null, 0 );
+
+ // Listen at the end of listeners chain to see if event wasn't canceled
+ // and to retrieve modified data.type.
+ editor.on( 'beforePaste', onBeforePaste, null, null, 1000 );
+
+ // getClipboardDataDirectly() will fire 'beforePaste' synchronously, so we can
+ // check if it was canceled and if any listener modified data.type.
+
+ // If command didn't succeed (only IE allows to access clipboard and only if
+ // user agrees) open and handle paste dialog.
+ if ( getClipboardDataDirectly() === false ) {
+ // Direct access to the clipboard wasn't successful so remove listener.
+ editor.removeListener( 'paste', onPaste );
+
+ // If beforePaste was canceled do not open dialog.
+ // Add listeners only if dialog really opened. 'pasteDialog' can be canceled.
+ if ( beforePasteNotCanceled && editor.fire( 'pasteDialog', onDialogOpen ) ) {
+ editor.on( 'pasteDialogCommit', onDialogCommit );
+
+ // 'dialogHide' will be fired after 'pasteDialogCommit'.
+ editor.on( 'dialogHide', function( evt ) {
+ evt.removeListener();
+ evt.data.removeListener( 'pasteDialogCommit', onDialogCommit );
+
+ // Because Opera has to wait a while in pasteDialog we have to wait here.
+ setTimeout( function() {
+ // Notify even if user canceled dialog (clicked 'cancel', ESC, etc).
+ if ( !dialogCommited )
+ callback( null );
+ }, 10 );
+ } );
+ } else {
+ callback( null );
+ }
+ }
+
+ function onPaste( evt ) {
+ evt.removeListener();
+ evt.cancel();
+ callback( evt.data );
+ }
+
+ function onBeforePaste( evt ) {
+ evt.removeListener();
+ beforePasteNotCanceled = true;
+ dataType = evt.data.type;
+ }
+
+ function onDialogCommit( evt ) {
+ evt.removeListener();
+ // Cancel pasteDialogCommit so paste dialog won't automatically fire
+ // 'paste' evt by itself.
+ evt.cancel();
+ dialogCommited = true;
+ callback( {
+ type: dataType,
+ dataValue: evt.data.dataValue,
+ dataTransfer: evt.data.dataTransfer,
+ method: 'paste'
+ } );
+ }
+
+ function onDialogOpen() {
+ this.customTitle = ( options && options.title );
+ }
+ };
+
+ function addButtonsCommands() {
+ addButtonCommand( 'Cut', 'cut', createCutCopyCmd( 'cut' ), 10, 1 );
+ addButtonCommand( 'Copy', 'copy', createCutCopyCmd( 'copy' ), 20, 4 );
+ addButtonCommand( 'Paste', 'paste', createPasteCmd(), 30, 8 );
+
+ function addButtonCommand( buttonName, commandName, command, toolbarOrder, ctxMenuOrder ) {
+ var lang = editor.lang.clipboard[ commandName ];
+
+ editor.addCommand( commandName, command );
+ editor.ui.addButton && editor.ui.addButton( buttonName, {
+ label: lang,
+ command: commandName,
+ toolbar: 'clipboard,' + toolbarOrder
+ } );
+
+ // If the "menu" plugin is loaded, register the menu item.
+ if ( editor.addMenuItems ) {
+ editor.addMenuItem( commandName, {
+ label: lang,
+ command: commandName,
+ group: 'clipboard',
+ order: ctxMenuOrder
+ } );
+ }
+ }
+ }
+
+ function addListeners() {
+ editor.on( 'key', onKey );
+ editor.on( 'contentDom', addPasteListenersToEditable );
+
+ // For improved performance, we're checking the readOnly state on selectionChange instead of hooking a key event for that.
+ editor.on( 'selectionChange', function( evt ) {
+ inReadOnly = evt.data.selection.getRanges()[ 0 ].checkReadOnly();
+ setToolbarStates();
+ } );
+
+ // If the "contextmenu" plugin is loaded, register the listeners.
+ if ( editor.contextMenu ) {
+ editor.contextMenu.addListener( function( element, selection ) {
+ inReadOnly = selection.getRanges()[ 0 ].checkReadOnly();
+ return {
+ cut: stateFromNamedCommand( 'cut' ),
+ copy: stateFromNamedCommand( 'copy' ),
+ paste: stateFromNamedCommand( 'paste' )
+ };
+ } );
+ }
+ }
+
+ // Add events listeners to editable.
+ function addPasteListenersToEditable() {
+ var editable = editor.editable();
+
+ if ( CKEDITOR.plugins.clipboard.isCustomCopyCutSupported ) {
+ var initOnCopyCut = function( evt ) {
+ // If user tries to cut in read-only editor, we must prevent default action. (#13872)
+ if ( !editor.readOnly || evt.name != 'cut' ) {
+ clipboard.initPasteDataTransfer( evt, editor );
+ }
+ evt.data.preventDefault();
+ };
+
+ editable.on( 'copy', initOnCopyCut );
+ editable.on( 'cut', initOnCopyCut );
+
+ // Delete content with the low priority so one can overwrite cut data.
+ editable.on( 'cut', function() {
+ // If user tries to cut in read-only editor, we must prevent default action. (#13872)
+ if ( !editor.readOnly ) {
+ editor.extractSelectedHtml();
+ }
+ }, null, null, 999 );
+ }
+
+ // We'll be catching all pasted content in one line, regardless of whether
+ // it's introduced by a document command execution (e.g. toolbar buttons) or
+ // user paste behaviors (e.g. CTRL+V).
+ editable.on( clipboard.mainPasteEvent, function( evt ) {
+ if ( clipboard.mainPasteEvent == 'beforepaste' && preventBeforePasteEvent ) {
+ return;
+ }
+
+ // If you've just asked yourself why preventPasteEventNow() is not here, but
+ // in listener for CTRL+V and exec method of 'paste' command
+ // you've asked the same question we did.
+ //
+ // THE ANSWER:
+ //
+ // First thing to notice - this answer makes sense only for IE,
+ // because other browsers don't listen for 'paste' event.
+ //
+ // What would happen if we move preventPasteEventNow() here?
+ // For:
+ // * CTRL+V - IE fires 'beforepaste', so we prevent 'paste' and pasteDataFromClipboard(). OK.
+ // * editor.execCommand( 'paste' ) - we fire 'beforepaste', so we prevent
+ // 'paste' and pasteDataFromClipboard() and doc.execCommand( 'Paste' ). OK.
+ // * native context menu - IE fires 'beforepaste', so we prevent 'paste', but unfortunately
+ // on IE we fail with pasteDataFromClipboard() here, because of... we don't know why, but
+ // we just fail, so... we paste nothing. FAIL.
+ // * native menu bar - the same as for native context menu.
+ //
+ // But don't you know any way to distinguish first two cases from last two?
+ // Only one - special flag set in CTRL+V handler and exec method of 'paste'
+ // command. And that's what we did using preventPasteEventNow().
+
+ pasteDataFromClipboard( evt );
+ } );
+
+ // It's not possible to clearly handle all four paste methods (ctrl+v, native menu bar
+ // native context menu, editor's command) in one 'paste/beforepaste' event in IE.
+ //
+ // For ctrl+v & editor's command it's easy to handle pasting in 'beforepaste' listener,
+ // so we do this. For another two methods it's better to use 'paste' event.
+ //
+ // 'paste' is always being fired after 'beforepaste' (except of weird one on opening native
+ // context menu), so for two methods handled in 'beforepaste' we're canceling 'paste'
+ // using preventPasteEvent state.
+ //
+ // 'paste' event in IE is being fired before getClipboardDataByPastebin executes its callback.
+ //
+ // QUESTION: Why didn't you handle all 4 paste methods in handler for 'paste'?
+ // Wouldn't this just be simpler?
+ // ANSWER: Then we would have to evt.data.preventDefault() only for native
+ // context menu and menu bar pastes. The same with execIECommand().
+ // That would force us to mark CTRL+V and editor's paste command with
+ // special flag, other than preventPasteEvent. But we still would have to
+ // have preventPasteEvent for the second event fired by execIECommand.
+ // Code would be longer and not cleaner.
+ if ( clipboard.mainPasteEvent == 'beforepaste' ) {
+ editable.on( 'paste', function( evt ) {
+ if ( preventPasteEvent ) {
+ return;
+ }
+
+ // Cancel next 'paste' event fired by execIECommand( 'paste' )
+ // at the end of this callback.
+ preventPasteEventNow();
+
+ // Prevent native paste.
+ evt.data.preventDefault();
+
+ pasteDataFromClipboard( evt );
+
+ // Force IE to paste content into pastebin so pasteDataFromClipboard will work.
+ if ( !execIECommand( 'paste' ) ) {
+ editor.openDialog( 'paste' );
+ }
+ } );
+
+ // If mainPasteEvent is 'beforePaste' (IE before Edge),
+ // dismiss the (wrong) 'beforepaste' event fired on context/toolbar menu open. (#7953)
+ editable.on( 'contextmenu', preventBeforePasteEventNow, null, null, 0 );
+
+ editable.on( 'beforepaste', function( evt ) {
+ // Do not prevent event on CTRL+V and SHIFT+INS because it blocks paste (#11970).
+ if ( evt.data && !evt.data.$.ctrlKey && !evt.data.$.shiftKey )
+ preventBeforePasteEventNow();
+ }, null, null, 0 );
+ }
+
+ editable.on( 'beforecut', function() {
+ !preventBeforePasteEvent && fixCut( editor );
+ } );
+
+ var mouseupTimeout;
+
+ // Use editor.document instead of editable in non-IEs for observing mouseup
+ // since editable won't fire the event if selection process started within
+ // iframe and ended out of the editor (#9851).
+ editable.attachListener( CKEDITOR.env.ie ? editable : editor.document.getDocumentElement(), 'mouseup', function() {
+ mouseupTimeout = setTimeout( function() {
+ setToolbarStates();
+ }, 0 );
+ } );
+
+ // Make sure that deferred mouseup callback isn't executed after editor instance
+ // had been destroyed. This may happen when editor.destroy() is called in parallel
+ // with mouseup event (i.e. a button with onclick callback) (#10219).
+ editor.on( 'destroy', function() {
+ clearTimeout( mouseupTimeout );
+ } );
+
+ editable.on( 'keyup', setToolbarStates );
+ }
+
+ // Create object representing Cut or Copy commands.
+ function createCutCopyCmd( type ) {
+ return {
+ type: type,
+ canUndo: type == 'cut', // We can't undo copy to clipboard.
+ startDisabled: true,
+ fakeKeystroke: type == 'cut' ? CKEDITOR.CTRL + 88 /*X*/ : CKEDITOR.CTRL + 67 /*C*/,
+ exec: function() {
+ // Attempts to execute the Cut and Copy operations.
+ function tryToCutCopy( type ) {
+ if ( CKEDITOR.env.ie )
+ return execIECommand( type );
+
+ // non-IEs part
+ try {
+ // Other browsers throw an error if the command is disabled.
+ return editor.document.$.execCommand( type, false, null );
+ } catch ( e ) {
+ return false;
+ }
+ }
+
+ this.type == 'cut' && fixCut();
+
+ var success = tryToCutCopy( this.type );
+
+ if ( !success ) {
+ // Show cutError or copyError.
+ editor.showNotification( editor.lang.clipboard[ this.type + 'Error' ] ); // jshint ignore:line
+ }
+
+ return success;
+ }
+ };
+ }
+
+ function createPasteCmd() {
+ return {
+ // Snapshots are done manually by editable.insertXXX methods.
+ canUndo: false,
+ async: true,
+ fakeKeystroke: CKEDITOR.CTRL + 86 /*V*/,
+ exec: function( editor, data ) {
+ var cmd = this,
+ fire = function( data, withBeforePaste ) {
+ data && firePasteEvents( editor, data, !!withBeforePaste );
+
+ editor.fire( 'afterCommandExec', {
+ name: 'paste',
+ command: cmd,
+ returnValue: !!data
+ } );
+ };
+
+ // Check data precisely - don't open dialog on empty string.
+ if ( typeof data == 'string' )
+ fire( {
+ dataValue: data,
+ method: 'paste',
+ dataTransfer: clipboard.initPasteDataTransfer()
+ }, 1 );
+ else
+ editor.getClipboardData( fire );
+ }
+ };
+ }
+
+ function preventPasteEventNow() {
+ preventPasteEvent = 1;
+ // For safety reason we should wait longer than 0/1ms.
+ // We don't know how long execution of quite complex getClipboardData will take
+ // and in for example 'paste' listener execCommand() (which fires 'paste') is called
+ // after getClipboardData finishes.
+ // Luckily, it's impossible to immediately fire another 'paste' event we want to handle,
+ // because we only handle there native context menu and menu bar.
+ setTimeout( function() {
+ preventPasteEvent = 0;
+ }, 100 );
+ }
+
+ function preventBeforePasteEventNow() {
+ preventBeforePasteEvent = 1;
+ setTimeout( function() {
+ preventBeforePasteEvent = 0;
+ }, 10 );
+ }
+
+ // Tries to execute any of the paste, cut or copy commands in IE. Returns a
+ // boolean indicating that the operation succeeded.
+ // @param {String} command *LOWER CASED* name of command ('paste', 'cut', 'copy').
+ function execIECommand( command ) {
+ var doc = editor.document,
+ body = doc.getBody(),
+ enabled = false,
+ onExec = function() {
+ enabled = true;
+ };
+
+ // The following seems to be the only reliable way to detect that
+ // clipboard commands are enabled in IE. It will fire the
+ // onpaste/oncut/oncopy events only if the security settings allowed
+ // the command to execute.
+ body.on( command, onExec );
+
+ // IE7: document.execCommand has problem to paste into positioned element.
+ if ( CKEDITOR.env.version > 7 ) {
+ doc.$.execCommand( command );
+ } else {
+ doc.$.selection.createRange().execCommand( command );
+ }
+
+ body.removeListener( command, onExec );
+
+ return enabled;
+ }
+
+ // Cutting off control type element in IE standards breaks the selection entirely. (#4881)
+ function fixCut() {
+ if ( !CKEDITOR.env.ie || CKEDITOR.env.quirks )
+ return;
+
+ var sel = editor.getSelection(),
+ control, range, dummy;
+
+ if ( ( sel.getType() == CKEDITOR.SELECTION_ELEMENT ) && ( control = sel.getSelectedElement() ) ) {
+ range = sel.getRanges()[ 0 ];
+ dummy = editor.document.createText( '' );
+ dummy.insertBefore( control );
+ range.setStartBefore( dummy );
+ range.setEndAfter( control );
+ sel.selectRanges( [ range ] );
+
+ // Clear up the fix if the paste wasn't succeeded.
+ setTimeout( function() {
+ // Element still online?
+ if ( control.getParent() ) {
+ dummy.remove();
+ sel.selectElement( control );
+ }
+ }, 0 );
+ }
+ }
+
+ // Allow to peek clipboard content by redirecting the
+ // pasting content into a temporary bin and grab the content of it.
+ function getClipboardDataByPastebin( evt, callback ) {
+ var doc = editor.document,
+ editable = editor.editable(),
+ cancel = function( evt ) {
+ evt.cancel();
+ },
+ blurListener;
+
+ // Avoid recursions on 'paste' event or consequent paste too fast. (#5730)
+ if ( doc.getById( 'cke_pastebin' ) )
+ return;
+
+ var sel = editor.getSelection();
+ var bms = sel.createBookmarks();
+
+ // #11384. On IE9+ we use native selectionchange (i.e. editor#selectionCheck) to cache the most
+ // recent selection which we then lock on editable blur. See selection.js for more info.
+ // selectionchange fired before getClipboardDataByPastebin() cached selection
+ // before creating bookmark (cached selection will be invalid, because bookmarks modified the DOM),
+ // so we need to fire selectionchange one more time, to store current seleciton.
+ // Selection will be locked when we focus pastebin.
+ if ( CKEDITOR.env.ie )
+ sel.root.fire( 'selectionchange' );
+
+ // Create container to paste into.
+ // For rich content we prefer to use "body" since it holds
+ // the least possibility to be splitted by pasted content, while this may
+ // breaks the text selection on a frame-less editable, "div" would be
+ // the best one in that case.
+ // In another case on old IEs moving the selection into a "body" paste bin causes error panic.
+ // Body can't be also used for Opera which fills it with
+ // what is indistinguishable from pasted (copying in Opera isn't possible,
+ // but it can be copied from other browser).
+ var pastebin = new CKEDITOR.dom.element(
+ ( CKEDITOR.env.webkit || editable.is( 'body' ) ) && !CKEDITOR.env.ie ? 'body' : 'div', doc );
+
+ pastebin.setAttributes( {
+ id: 'cke_pastebin',
+ 'data-cke-temp': '1'
+ } );
+
+ var containerOffset = 0,
+ offsetParent,
+ win = doc.getWindow();
+
+ if ( CKEDITOR.env.webkit ) {
+ // It's better to paste close to the real paste destination, so inherited styles
+ // (which Webkits will try to compensate by styling span) differs less from the destination's one.
+ editable.append( pastebin );
+ // Style pastebin like .cke_editable, to minimize differences between origin and destination. (#9754)
+ pastebin.addClass( 'cke_editable' );
+
+ // Compensate position of offsetParent.
+ if ( !editable.is( 'body' ) ) {
+ // We're not able to get offsetParent from pastebin (body element), so check whether
+ // its parent (editable) is positioned.
+ if ( editable.getComputedStyle( 'position' ) != 'static' )
+ offsetParent = editable;
+ // And if not - safely get offsetParent from editable.
+ else
+ offsetParent = CKEDITOR.dom.element.get( editable.$.offsetParent );
+
+ containerOffset = offsetParent.getDocumentPosition().y;
+ }
+ } else {
+ // Opera and IE doesn't allow to append to html element.
+ editable.getAscendant( CKEDITOR.env.ie ? 'body' : 'html', 1 ).append( pastebin );
+ }
+
+ pastebin.setStyles( {
+ position: 'absolute',
+ // Position the bin at the top (+10 for safety) of viewport to avoid any subsequent document scroll.
+ top: ( win.getScrollPosition().y - containerOffset + 10 ) + 'px',
+ width: '1px',
+ // Caret has to fit in that height, otherwise browsers like Chrome & Opera will scroll window to show it.
+ // Set height equal to viewport's height - 20px (safety gaps), minimum 1px.
+ height: Math.max( 1, win.getViewPaneSize().height - 20 ) + 'px',
+ overflow: 'hidden',
+ // Reset styles that can mess up pastebin position.
+ margin: 0,
+ padding: 0
+ } );
+
+ // Paste fails in Safari when the body tag has 'user-select: none'. (#12506)
+ if ( CKEDITOR.env.safari )
+ pastebin.setStyles( CKEDITOR.tools.cssVendorPrefix( 'user-select', 'text' ) );
+
+ // Check if the paste bin now establishes new editing host.
+ var isEditingHost = pastebin.getParent().isReadOnly();
+
+ if ( isEditingHost ) {
+ // Hide the paste bin.
+ pastebin.setOpacity( 0 );
+ // And make it editable.
+ pastebin.setAttribute( 'contenteditable', true );
+ }
+ // Transparency is not enough since positioned non-editing host always shows
+ // resize handler, pull it off the screen instead.
+ else {
+ pastebin.setStyle( editor.config.contentsLangDirection == 'ltr' ? 'left' : 'right', '-10000px' );
+ }
+
+ editor.on( 'selectionChange', cancel, null, null, 0 );
+
+ // Webkit fill fire blur on editable when moving selection to
+ // pastebin (if body is used). Cancel it because it causes incorrect
+ // selection lock in case of inline editor (#10644).
+ // The same seems to apply to Firefox (#10787).
+ if ( CKEDITOR.env.webkit || CKEDITOR.env.gecko )
+ blurListener = editable.once( 'blur', cancel, null, null, -100 );
+
+ // Temporarily move selection to the pastebin.
+ isEditingHost && pastebin.focus();
+ var range = new CKEDITOR.dom.range( pastebin );
+ range.selectNodeContents( pastebin );
+ var selPastebin = range.select();
+
+ // If non-native paste is executed, IE will open security alert and blur editable.
+ // Editable will then lock selection inside itself and after accepting security alert
+ // this selection will be restored. We overwrite stored selection, so it's restored
+ // in pastebin. (#9552)
+ if ( CKEDITOR.env.ie ) {
+ blurListener = editable.once( 'blur', function() {
+ editor.lockSelection( selPastebin );
+ } );
+ }
+
+ var scrollTop = CKEDITOR.document.getWindow().getScrollPosition().y;
+
+ // Wait a while and grab the pasted contents.
+ setTimeout( function() {
+ // Restore main window's scroll position which could have been changed
+ // by browser in cases described in #9771.
+ if ( CKEDITOR.env.webkit )
+ CKEDITOR.document.getBody().$.scrollTop = scrollTop;
+
+ // Blur will be fired only on non-native paste. In other case manually remove listener.
+ blurListener && blurListener.removeListener();
+
+ // Restore properly the document focus. (#8849)
+ if ( CKEDITOR.env.ie )
+ editable.focus();
+
+ // IE7: selection must go before removing pastebin. (#8691)
+ sel.selectBookmarks( bms );
+ pastebin.remove();
+
+ // Grab the HTML contents.
+ // We need to look for a apple style wrapper on webkit it also adds
+ // a div wrapper if you copy/paste the body of the editor.
+ // Remove hidden div and restore selection.
+ var bogusSpan;
+ if ( CKEDITOR.env.webkit && ( bogusSpan = pastebin.getFirst() ) && ( bogusSpan.is && bogusSpan.hasClass( 'Apple-style-span' ) ) )
+ pastebin = bogusSpan;
+
+ editor.removeListener( 'selectionChange', cancel );
+ callback( pastebin.getHtml() );
+ }, 0 );
+ }
+
+ // Try to get content directly on IE from clipboard, without native event
+ // being fired before. In other words - synthetically get clipboard data, if it's possible.
+ // mainPasteEvent will be fired, so if forced native paste:
+ // * worked, getClipboardDataByPastebin will grab it,
+ // * didn't work, dataValue and dataTransfer will be empty and editor#paste won't be fired.
+ // Clipboard data can be accessed directly only on IEs older than Edge.
+ // On other browsers we should fire beforePaste event and return false.
+ function getClipboardDataDirectly() {
+ if ( clipboard.mainPasteEvent == 'paste' ) {
+ // beforePaste should be fired when dialog open so it can be canceled.
+ editor.fire( 'beforePaste', { type: 'auto', method: 'paste' } );
+ return false;
+ }
+
+ // Prevent IE from pasting at the begining of the document.
+ editor.focus();
+
+ // Command will be handled by 'beforepaste', but as
+ // execIECommand( 'paste' ) will fire also 'paste' event
+ // we're canceling it.
+ preventPasteEventNow();
+
+ // #9247: Lock focus to prevent IE from hiding toolbar for inline editor.
+ var focusManager = editor.focusManager;
+ focusManager.lock();
+
+ if ( editor.editable().fire( clipboard.mainPasteEvent ) && !execIECommand( 'paste' ) ) {
+ focusManager.unlock();
+ return false;
+ }
+ focusManager.unlock();
+
+ return true;
+ }
+
+ // Listens for some clipboard related keystrokes, so they get customized.
+ // Needs to be bind to keydown event.
+ function onKey( event ) {
+ if ( editor.mode != 'wysiwyg' )
+ return;
+
+ switch ( event.data.keyCode ) {
+ // Paste
+ case CKEDITOR.CTRL + 86: // CTRL+V
+ case CKEDITOR.SHIFT + 45: // SHIFT+INS
+ var editable = editor.editable();
+
+ // Cancel 'paste' event because ctrl+v is for IE handled
+ // by 'beforepaste'.
+ preventPasteEventNow();
+
+ // Simulate 'beforepaste' event for all browsers using 'paste' as main event.
+ if ( clipboard.mainPasteEvent == 'paste' ) {
+ editable.fire( 'beforepaste' );
+ }
+
+ return;
+
+ // Cut
+ case CKEDITOR.CTRL + 88: // CTRL+X
+ case CKEDITOR.SHIFT + 46: // SHIFT+DEL
+ // Save Undo snapshot.
+ editor.fire( 'saveSnapshot' ); // Save before cut
+ setTimeout( function() {
+ editor.fire( 'saveSnapshot' ); // Save after cut
+ }, 50 ); // OSX is slow (#11416).
+ }
+ }
+
+ function pasteDataFromClipboard( evt ) {
+ // Default type is 'auto', but can be changed by beforePaste listeners.
+ var eventData = {
+ type: 'auto',
+ method: 'paste',
+ dataTransfer: clipboard.initPasteDataTransfer( evt )
+ };
+
+ eventData.dataTransfer.cacheData();
+
+ // Fire 'beforePaste' event so clipboard flavor get customized by other plugins.
+ // If 'beforePaste' is canceled continue executing getClipboardDataByPastebin and then do nothing
+ // (do not fire 'paste', 'afterPaste' events). This way we can grab all - synthetically
+ // and natively pasted content and prevent its insertion into editor
+ // after canceling 'beforePaste' event.
+ var beforePasteNotCanceled = editor.fire( 'beforePaste', eventData ) !== false;
+
+ // Do not use paste bin if the browser let us get HTML or files from dataTranfer.
+ if ( beforePasteNotCanceled && clipboard.canClipboardApiBeTrusted( eventData.dataTransfer, editor ) ) {
+ evt.data.preventDefault();
+ setTimeout( function() {
+ firePasteEvents( editor, eventData );
+ }, 0 );
+ } else {
+ getClipboardDataByPastebin( evt, function( data ) {
+ // Clean up.
+ eventData.dataValue = data.replace( /]+data-cke-bookmark[^<]*?<\/span>/ig, '' );
+
+ // Fire remaining events (without beforePaste)
+ beforePasteNotCanceled && firePasteEvents( editor, eventData );
+ } );
+ }
+ }
+
+ function setToolbarStates() {
+ if ( editor.mode != 'wysiwyg' )
+ return;
+
+ var pasteState = stateFromNamedCommand( 'paste' );
+
+ editor.getCommand( 'cut' ).setState( stateFromNamedCommand( 'cut' ) );
+ editor.getCommand( 'copy' ).setState( stateFromNamedCommand( 'copy' ) );
+ editor.getCommand( 'paste' ).setState( pasteState );
+ editor.fire( 'pasteState', pasteState );
+ }
+
+ function stateFromNamedCommand( command ) {
+ if ( inReadOnly && command in { paste: 1, cut: 1 } )
+ return CKEDITOR.TRISTATE_DISABLED;
+
+ if ( command == 'paste' )
+ return CKEDITOR.TRISTATE_OFF;
+
+ // Cut, copy - check if the selection is not empty.
+ var sel = editor.getSelection(),
+ ranges = sel.getRanges(),
+ selectionIsEmpty = sel.getType() == CKEDITOR.SELECTION_NONE || ( ranges.length == 1 && ranges[ 0 ].collapsed );
+
+ return selectionIsEmpty ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_OFF;
+ }
+ }
+
+ // Returns:
+ // * 'htmlifiedtext' if content looks like transformed by browser from plain text.
+ // See clipboard/paste.html TCs for more info.
+ // * 'html' if it is not 'htmlifiedtext'.
+ function recogniseContentType( data ) {
+ if ( CKEDITOR.env.webkit ) {
+ // Plain text or (
and text inside
).
+ if ( !data.match( /^[^<]*$/g ) && !data.match( /^(
<\/div>|
[^<]*<\/div>)*$/gi ) )
+ return 'html';
+ } else if ( CKEDITOR.env.ie ) {
+ // Text and or ( text and in
- paragraphs can be separated by new \r\n ).
+ if ( !data.match( /^([^<]| )*$/gi ) && !data.match( /^(
([^<]| )*<\/p>|(\r\n))*$/gi ) )
+ return 'html';
+ } else if ( CKEDITOR.env.gecko ) {
+ // Text or .
+ if ( !data.match( /^([^<]| )*$/gi ) )
+ return 'html';
+ } else {
+ return 'html';
+ }
+
+ return 'htmlifiedtext';
+ }
+
+ // This function transforms what browsers produce when
+ // pasting plain text into editable element (see clipboard/paste.html TCs
+ // for more info) into correct HTML (similar to that produced by text2Html).
+ function htmlifiedTextHtmlification( config, data ) {
+ function repeatParagraphs( repeats ) {
+ // Repeat blocks floor((n+1)/2) times.
+ // Even number of repeats - add at the beginning of last
.
+ return CKEDITOR.tools.repeat( '
', ~~( repeats / 2 ) ) + ( repeats % 2 == 1 ? ' ' : '' );
+ }
+
+ // Replace adjacent white-spaces (EOLs too - Fx sometimes keeps them) with one space.
+ data = data.replace( /\s+/g, ' ' )
+ // Remove spaces from between tags.
+ .replace( /> +<' )
+ // Normalize XHTML syntax and upper cased tags.
+ .replace( / /gi, ' ' );
+
+ // IE - lower cased tags.
+ data = data.replace( /<\/?[A-Z]+>/g, function( match ) {
+ return match.toLowerCase();
+ } );
+
+ // Don't touch single lines (no ) - nothing to do here.
+ if ( data.match( /^[^<]$/ ) )
+ return data;
+
+ // Webkit.
+ if ( CKEDITOR.env.webkit && data.indexOf( '
' ) > -1 ) {
+ // One line break at the beginning - insert
+ data = data.replace( /^(
( |)<\/div>)(?!$|(
( |)<\/div>))/g, ' ' )
+ // Two or more - reduce number of new lines by one.
+ .replace( /^(
( |)<\/div>){2}(?!$)/g, '' );
+
+ // Two line breaks create one paragraph in Webkit.
+ if ( data.match( /
' ).length + 1 );
+ } ) + '';
+ }
+
+ // One line break create br.
+ data = data.replace( /<\/div>
/g, ' ' );
+
+ // Remove remaining divs.
+ data = data.replace( /<\/?div>/g, '' );
+ }
+
+ // Opera and Firefox and enterMode != BR.
+ if ( CKEDITOR.env.gecko && config.enterMode != CKEDITOR.ENTER_BR ) {
+ // Remove bogus - Fx generates two for one line break.
+ // For two line breaks it still produces two , but it's better to ignore this case than the first one.
+ if ( CKEDITOR.env.gecko )
+ data = data.replace( /^
$/, ' ' );
+
+ // This line satisfy edge case when for Opera we have two line breaks
+ //data = data.replace( /)
+
+ if ( data.indexOf( '
' ) > -1 ) {
+ // Two line breaks create one paragraph, three - 2, four - 3, etc.
+ data = '
';
+ }
+ }
+
+ return switchEnterMode( config, data );
+ }
+
+ function filtersFactoryFactory() {
+ var filters = {};
+
+ function setUpTags() {
+ var tags = {};
+
+ for ( var tag in CKEDITOR.dtd ) {
+ if ( tag.charAt( 0 ) != '$' && tag != 'div' && tag != 'span' ) {
+ tags[ tag ] = 1;
+ }
+ }
+
+ return tags;
+ }
+
+ function createSemanticContentFilter() {
+ var filter = new CKEDITOR.filter();
+
+ filter.allow( {
+ $1: {
+ elements: setUpTags(),
+ attributes: true,
+ styles: false,
+ classes: false
+ }
+ } );
+
+ return filter;
+ }
+
+ return {
+ get: function( type ) {
+ if ( type == 'plain-text' ) {
+ // Does this look confusing to you? Did we forget about enter mode?
+ // It is a trick that let's us creating one filter for edidtor, regardless of its
+ // activeEnterMode (which as the name indicates can change during runtime).
+ //
+ // How does it work?
+ // The active enter mode is passed to the filter.applyTo method.
+ // The filter first marks all elements except as disallowed and then tries to remove
+ // them. However, it cannot remove e.g. a
element completely, because it's a basic structural element,
+ // so it tries to replace it with an element created based on the active enter mode, eventually doing nothing.
+ //
+ // Now you can sleep well.
+ return filters.plainText || ( filters.plainText = new CKEDITOR.filter( 'br' ) );
+ } else if ( type == 'semantic-content' ) {
+ return filters.semanticContent || ( filters.semanticContent = createSemanticContentFilter() );
+ } else if ( type ) {
+ // Create filter based on rules (string or object).
+ return new CKEDITOR.filter( type );
+ }
+
+ return null;
+ }
+ };
+ }
+
+ function filterContent( editor, data, filter ) {
+ var fragment = CKEDITOR.htmlParser.fragment.fromHtml( data ),
+ writer = new CKEDITOR.htmlParser.basicWriter();
+
+ filter.applyTo( fragment, true, false, editor.activeEnterMode );
+ fragment.writeHtml( writer );
+
+ return writer.getHtml();
+ }
+
+ function switchEnterMode( config, data ) {
+ if ( config.enterMode == CKEDITOR.ENTER_BR ) {
+ data = data.replace( /(<\/p>
)+/g, function( match ) {
+ return CKEDITOR.tools.repeat( ' ', match.length / 7 * 2 );
+ } ).replace( /<\/?p>/g, '' );
+ } else if ( config.enterMode == CKEDITOR.ENTER_DIV ) {
+ data = data.replace( /<(\/)?p>/g, '<$1div>' );
+ }
+
+ return data;
+ }
+
+ function preventDefaultSetDropEffectToNone( evt ) {
+ evt.data.preventDefault();
+ evt.data.$.dataTransfer.dropEffect = 'none';
+ }
+
+ function initDragDrop( editor ) {
+ var clipboard = CKEDITOR.plugins.clipboard;
+
+ editor.on( 'contentDom', function() {
+ var editable = editor.editable(),
+ dropTarget = CKEDITOR.plugins.clipboard.getDropTarget( editor ),
+ top = editor.ui.space( 'top' ),
+ bottom = editor.ui.space( 'bottom' );
+
+ // -------------- DRAGOVER TOP & BOTTOM --------------
+
+ // Not allowing dragging on toolbar and bottom (#12613).
+ clipboard.preventDefaultDropOnElement( top );
+ clipboard.preventDefaultDropOnElement( bottom );
+
+ // -------------- DRAGSTART --------------
+ // Listed on dragstart to mark internal and cross-editor drag & drop
+ // and save range and selected HTML.
+
+ editable.attachListener( dropTarget, 'dragstart', fireDragEvent );
+
+ // Make sure to reset data transfer (in case dragend was not called or was canceled).
+ editable.attachListener( editor, 'dragstart', clipboard.resetDragDataTransfer, clipboard, null, 1 );
+
+ // Create a dataTransfer object and save it globally.
+ editable.attachListener( editor, 'dragstart', function( evt ) {
+ clipboard.initDragDataTransfer( evt, editor );
+ }, null, null, 2 );
+
+ editable.attachListener( editor, 'dragstart', function() {
+ // Save drag range globally for cross editor D&D.
+ var dragRange = clipboard.dragRange = editor.getSelection().getRanges()[ 0 ];
+
+ // Store number of children, so we can later tell if any text node was split on drop. (#13011, #13447)
+ if ( CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) {
+ clipboard.dragStartContainerChildCount = dragRange ? getContainerChildCount( dragRange.startContainer ) : null;
+ clipboard.dragEndContainerChildCount = dragRange ? getContainerChildCount( dragRange.endContainer ) : null;
+ }
+ }, null, null, 100 );
+
+ // -------------- DRAGEND --------------
+ // Clean up on dragend.
+
+ editable.attachListener( dropTarget, 'dragend', fireDragEvent );
+
+ // Init data transfer if someone wants to use it in dragend.
+ editable.attachListener( editor, 'dragend', clipboard.initDragDataTransfer, clipboard, null, 1 );
+
+ // When drag & drop is done we need to reset dataTransfer so the future
+ // external drop will be not recognize as internal.
+ editable.attachListener( editor, 'dragend', clipboard.resetDragDataTransfer, clipboard, null, 100 );
+
+ // -------------- DRAGOVER --------------
+ // We need to call preventDefault on dragover because otherwise if
+ // we drop image it will overwrite document.
+
+ editable.attachListener( dropTarget, 'dragover', function( evt ) {
+ var target = evt.data.getTarget();
+
+ // Prevent reloading page when dragging image on empty document (#12619).
+ if ( target && target.is && target.is( 'html' ) ) {
+ evt.data.preventDefault();
+ return;
+ }
+
+ // If we do not prevent default dragover on IE the file path
+ // will be loaded and we will lose content. On the other hand
+ // if we prevent it the cursor will not we shown, so we prevent
+ // dragover only on IE, on versions which support file API and only
+ // if the event contains files.
+ if ( CKEDITOR.env.ie &&
+ CKEDITOR.plugins.clipboard.isFileApiSupported &&
+ evt.data.$.dataTransfer.types.contains( 'Files' ) ) {
+ evt.data.preventDefault();
+ }
+ } );
+
+ // -------------- DROP --------------
+
+ editable.attachListener( dropTarget, 'drop', function( evt ) {
+ // Do nothing if event was already prevented. (#13879)
+ if ( evt.data.$.defaultPrevented ) {
+ return;
+ }
+
+ // Cancel native drop.
+ evt.data.preventDefault();
+
+ var target = evt.data.getTarget(),
+ readOnly = target.isReadOnly();
+
+ // Do nothing if drop on non editable element (#13015).
+ // The tag isn't editable (body is), but we want to allow drop on it
+ // (so it is possible to drop below editor contents).
+ if ( readOnly && !( target.type == CKEDITOR.NODE_ELEMENT && target.is( 'html' ) ) ) {
+ return;
+ }
+
+ // Getting drop position is one of the most complex parts.
+ var dropRange = clipboard.getRangeAtDropPosition( evt, editor ),
+ dragRange = clipboard.dragRange;
+
+ // Do nothing if it was not possible to get drop range.
+ if ( !dropRange ) {
+ return;
+ }
+
+ // Fire drop.
+ fireDragEvent( evt, dragRange, dropRange );
+ }, null, null, 9999 );
+
+ // Create dataTransfer or get it, if it was created before.
+ editable.attachListener( editor, 'drop', clipboard.initDragDataTransfer, clipboard, null, 1 );
+
+ // Execute drop action, fire paste.
+ editable.attachListener( editor, 'drop', function( evt ) {
+ var data = evt.data;
+
+ if ( !data ) {
+ return;
+ }
+
+ // Let user modify drag and drop range.
+ var dropRange = data.dropRange,
+ dragRange = data.dragRange,
+ dataTransfer = data.dataTransfer;
+
+ if ( dataTransfer.getTransferType( editor ) == CKEDITOR.DATA_TRANSFER_INTERNAL ) {
+ // Execute drop with a timeout because otherwise selection, after drop,
+ // on IE is in the drag position, instead of drop position.
+ setTimeout( function() {
+ clipboard.internalDrop( dragRange, dropRange, dataTransfer, editor );
+ }, 0 );
+ } else if ( dataTransfer.getTransferType( editor ) == CKEDITOR.DATA_TRANSFER_CROSS_EDITORS ) {
+ crossEditorDrop( dragRange, dropRange, dataTransfer );
+ } else {
+ externalDrop( dropRange, dataTransfer );
+ }
+ }, null, null, 9999 );
+
+ // Cross editor drag and drop (drag in one Editor and drop in the other).
+ function crossEditorDrop( dragRange, dropRange, dataTransfer ) {
+ // Paste event should be fired before delete contents because otherwise
+ // Chrome have a problem with drop range (Chrome split the drop
+ // range container so the offset is bigger then container length).
+ dropRange.select();
+ firePasteEvents( editor, { dataTransfer: dataTransfer, method: 'drop' }, 1 );
+
+ // Remove dragged content and make a snapshot.
+ dataTransfer.sourceEditor.fire( 'saveSnapshot' );
+
+ dataTransfer.sourceEditor.editable().extractHtmlFromRange( dragRange );
+
+ // Make some selection before saving snapshot, otherwise error will be thrown, because
+ // there will be no valid selection after content is removed.
+ dataTransfer.sourceEditor.getSelection().selectRanges( [ dragRange ] );
+ dataTransfer.sourceEditor.fire( 'saveSnapshot' );
+ }
+
+ // Drop from external source.
+ function externalDrop( dropRange, dataTransfer ) {
+ // Paste content into the drop position.
+ dropRange.select();
+
+ firePasteEvents( editor, { dataTransfer: dataTransfer, method: 'drop' }, 1 );
+
+ // Usually we reset DataTranfer on dragend,
+ // but dragend is called on the same element as dragstart
+ // so it will not be called on on external drop.
+ clipboard.resetDragDataTransfer();
+ }
+
+ // Fire drag/drop events (dragstart, dragend, drop).
+ function fireDragEvent( evt, dragRange, dropRange ) {
+ var eventData = {
+ $: evt.data.$,
+ target: evt.data.getTarget()
+ };
+
+ if ( dragRange ) {
+ eventData.dragRange = dragRange;
+ }
+ if ( dropRange ) {
+ eventData.dropRange = dropRange;
+ }
+
+ if ( editor.fire( evt.name, eventData ) === false ) {
+ evt.data.preventDefault();
+ }
+ }
+
+ function getContainerChildCount( container ) {
+ if ( container.type != CKEDITOR.NODE_ELEMENT ) {
+ container = container.getParent();
+ }
+
+ return container.getChildCount();
+ }
+ } );
+ }
+
+ /**
+ * @singleton
+ * @class CKEDITOR.plugins.clipboard
+ */
+ CKEDITOR.plugins.clipboard = {
+ /**
+ * True if the environment allows to set data on copy or cut manually. This value is false in IE, because this browser
+ * shows the security dialog window when the script tries to set clipboard data and on iOS, because custom data is
+ * not saved to clipboard there.
+ *
+ * @since 4.5
+ * @readonly
+ * @property {Boolean}
+ */
+ isCustomCopyCutSupported: !CKEDITOR.env.ie && !CKEDITOR.env.iOS,
+
+ /**
+ * True if the environment supports MIME types and custom data types in dataTransfer/cliboardData getData/setData methods.
+ *
+ * @since 4.5
+ * @readonly
+ * @property {Boolean}
+ */
+ isCustomDataTypesSupported: !CKEDITOR.env.ie,
+
+ /**
+ * True if the environment supports File API.
+ *
+ * @since 4.5
+ * @readonly
+ * @property {Boolean}
+ */
+ isFileApiSupported: !CKEDITOR.env.ie || CKEDITOR.env.version > 9,
+
+ /**
+ * Main native paste event editable should listen to.
+ *
+ * **Note:** Safari does not like the {@link CKEDITOR.editor#beforePaste} event — it sometimes does not
+ * handle Ctrl+C properly. This is probably caused by some race condition between events.
+ * Chrome, Firefox and Edge work well with both events, so it is better to use {@link CKEDITOR.editor#paste}
+ * which will handle pasting from e.g. browsers' menu bars.
+ * IE7/8 does not like the {@link CKEDITOR.editor#paste} event for which it is throwing random errors.
+ *
+ * @since 4.5
+ * @readonly
+ * @property {String}
+ */
+ mainPasteEvent: ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) ? 'beforepaste' : 'paste',
+
+ /**
+ * Returns `true` if it is expected that a browser provides HTML data through the Clipboard API.
+ * If not, this method returns `false` and as a result CKEditor will use the paste bin. Read more in
+ * the [Clipboard Integration](http://docs.ckeditor.com/#!/guide/dev_clipboard-section-clipboard-api) guide.
+ *
+ * @since 4.5.2
+ * @returns {Boolean}
+ */
+ canClipboardApiBeTrusted: function( dataTransfer, editor ) {
+ // If it's an internal or cross-editor data transfer, then it means that custom cut/copy/paste support works
+ // and that the data were put manually on the data transfer so we can be sure that it's available.
+ if ( dataTransfer.getTransferType( editor ) != CKEDITOR.DATA_TRANSFER_EXTERNAL ) {
+ return true;
+ }
+
+ // In Chrome we can trust Clipboard API, with the exception of Chrome on Android (in both - mobile and desktop modes), where
+ // clipboard API is not available so we need to check it (#13187).
+ if ( CKEDITOR.env.chrome && !dataTransfer.isEmpty() ) {
+ return true;
+ }
+
+ // Because of a Firefox bug HTML data are not available in some cases (e.g. paste from Word), in such cases we
+ // need to use the pastebin (#13528, https://bugzilla.mozilla.org/show_bug.cgi?id=1183686).
+ if ( CKEDITOR.env.gecko && ( dataTransfer.getData( 'text/html' ) || dataTransfer.getFilesCount() ) ) {
+ return true;
+ }
+
+ // In Safari and IE HTML data is not available though the Clipboard API.
+ // In Edge things are a bit messy at the moment -
+ // https://connect.microsoft.com/IE/feedback/details/1572456/edge-clipboard-api-text-html-content-messed-up-in-event-clipboarddata
+ // It is safer to use the paste bin in unknown cases.
+ return false;
+ },
+
+ /**
+ * Returns the element that should be used as the target for the drop event.
+ *
+ * @since 4.5
+ * @param {CKEDITOR.editor} editor The editor instance.
+ * @returns {CKEDITOR.dom.domObject} the element that should be used as the target for the drop event.
+ */
+ getDropTarget: function( editor ) {
+ var editable = editor.editable();
+
+ // #11123 Firefox needs to listen on document, because otherwise event won't be fired.
+ // #11086 IE8 cannot listen on document.
+ if ( ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 ) || editable.isInline() ) {
+ return editable;
+ } else {
+ return editor.document;
+ }
+ },
+
+ /**
+ * IE 8 & 9 split text node on drop so the first node contains the
+ * text before the drop position and the second contains the rest. If you
+ * drag the content from the same node you will be not be able to get
+ * it (the range becomes invalid), so you need to join them back.
+ *
+ * Note that the first node in IE 8 & 9 is the original node object
+ * but with shortened content.
+ *
+ * Before:
+ * --- Text Node A ----------------------------------
+ * /\
+ * Drag position
+ *
+ * After (IE 8 & 9):
+ * --- Text Node A ----- --- Text Node B -----------
+ * /\ /\
+ * Drop position Drag position
+ * (invalid)
+ *
+ * After (other browsers):
+ * --- Text Node A ----------------------------------
+ * /\ /\
+ * Drop position Drag position
+ *
+ * **Note:** This function is in the public scope for tests usage only.
+ *
+ * @since 4.5
+ * @private
+ * @param {CKEDITOR.dom.range} dragRange The drag range.
+ * @param {CKEDITOR.dom.range} dropRange The drop range.
+ * @param {Number} preDragStartContainerChildCount The number of children of the drag range start container before the drop.
+ * @param {Number} preDragEndContainerChildCount The number of children of the drag range end container before the drop.
+ */
+ fixSplitNodesAfterDrop: function( dragRange, dropRange, preDragStartContainerChildCount, preDragEndContainerChildCount ) {
+ var dropContainer = dropRange.startContainer;
+
+ if (
+ typeof preDragEndContainerChildCount != 'number' ||
+ typeof preDragStartContainerChildCount != 'number'
+ ) {
+ return;
+ }
+
+ // We are only concerned about ranges anchored in elements.
+ if ( dropContainer.type != CKEDITOR.NODE_ELEMENT ) {
+ return;
+ }
+
+ if ( handleContainer( dragRange.startContainer, dropContainer, preDragStartContainerChildCount ) ) {
+ return;
+ }
+
+ if ( handleContainer( dragRange.endContainer, dropContainer, preDragEndContainerChildCount ) ) {
+ return;
+ }
+
+ function handleContainer( dragContainer, dropContainer, preChildCount ) {
+ var dragElement = dragContainer;
+ if ( dragElement.type == CKEDITOR.NODE_TEXT ) {
+ dragElement = dragContainer.getParent();
+ }
+
+ if ( dragElement.equals( dropContainer ) && preChildCount != dropContainer.getChildCount() ) {
+ applyFix( dropRange );
+ return true;
+ }
+ }
+
+ function applyFix( dropRange ) {
+ var nodeBefore = dropRange.startContainer.getChild( dropRange.startOffset - 1 ),
+ nodeAfter = dropRange.startContainer.getChild( dropRange.startOffset );
+
+ if (
+ nodeBefore && nodeBefore.type == CKEDITOR.NODE_TEXT &&
+ nodeAfter && nodeAfter.type == CKEDITOR.NODE_TEXT
+ ) {
+ var offset = nodeBefore.getLength();
+
+ nodeBefore.setText( nodeBefore.getText() + nodeAfter.getText() );
+ nodeAfter.remove();
+
+ dropRange.setStart( nodeBefore, offset );
+ dropRange.collapse( true );
+ }
+ }
+ },
+
+ /**
+ * Checks whether turning the drag range into bookmarks will invalidate the drop range.
+ * This usually happens when the drop range shares the container with the drag range and is
+ * located after the drag range, but there are countless edge cases.
+ *
+ * This function is stricly related to {@link #internalDrop} which toggles
+ * order in which it creates bookmarks for both ranges based on a value returned
+ * by this method. In some cases this method returns a value which is not necessarily
+ * true in terms of what it was meant to check, but it is convenient, because
+ * we know how it is interpreted in {@link #internalDrop}, so the correct
+ * behavior of the entire algorithm is assured.
+ *
+ * **Note:** This function is in the public scope for tests usage only.
+ *
+ * @since 4.5
+ * @private
+ * @param {CKEDITOR.dom.range} dragRange The first range to compare.
+ * @param {CKEDITOR.dom.range} dropRange The second range to compare.
+ * @returns {Boolean} `true` if the first range is before the second range.
+ */
+ isDropRangeAffectedByDragRange: function( dragRange, dropRange ) {
+ var dropContainer = dropRange.startContainer,
+ dropOffset = dropRange.endOffset;
+
+ // Both containers are the same and drop offset is at the same position or later.
+ // " A L] A " " M A "
+ // ^ ^
+ if ( dragRange.endContainer.equals( dropContainer ) && dragRange.endOffset <= dropOffset ) {
+ return true;
+ }
+
+ // Bookmark for drag start container will mess up with offsets.
+ // " O [L A " " M A "
+ // ^ ^
+ if (
+ dragRange.startContainer.getParent().equals( dropContainer ) &&
+ dragRange.startContainer.getIndex() < dropOffset
+ ) {
+ return true;
+ }
+
+ // Bookmark for drag end container will mess up with offsets.
+ // " O] L A " " M A "
+ // ^ ^
+ if (
+ dragRange.endContainer.getParent().equals( dropContainer ) &&
+ dragRange.endContainer.getIndex() < dropOffset
+ ) {
+ return true;
+ }
+
+ return false;
+ },
+
+ /**
+ * Internal drag and drop (drag and drop in the same editor instance).
+ *
+ * **Note:** This function is in the public scope for tests usage only.
+ *
+ * @since 4.5
+ * @private
+ * @param {CKEDITOR.dom.range} dragRange The first range to compare.
+ * @param {CKEDITOR.dom.range} dropRange The second range to compare.
+ * @param {CKEDITOR.plugins.clipboard.dataTransfer} dataTransfer
+ * @param {CKEDITOR.editor} editor
+ */
+ internalDrop: function( dragRange, dropRange, dataTransfer, editor ) {
+ var clipboard = CKEDITOR.plugins.clipboard,
+ editable = editor.editable(),
+ dragBookmark, dropBookmark, isDropRangeAffected;
+
+ // Save and lock snapshot so there will be only
+ // one snapshot for both remove and insert content.
+ editor.fire( 'saveSnapshot' );
+ editor.fire( 'lockSnapshot', { dontUpdate: 1 } );
+
+ if ( CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) {
+ this.fixSplitNodesAfterDrop(
+ dragRange,
+ dropRange,
+ clipboard.dragStartContainerChildCount,
+ clipboard.dragEndContainerChildCount
+ );
+ }
+
+ // Because we manipulate multiple ranges we need to do it carefully,
+ // changing one range (event creating a bookmark) may make other invalid.
+ // We need to change ranges into bookmarks so we can manipulate them easily in the future.
+ // We can change the range which is later in the text before we change the preceding range.
+ // We call isDropRangeAffectedByDragRange to test the order of ranges.
+ isDropRangeAffected = this.isDropRangeAffectedByDragRange( dragRange, dropRange );
+ if ( !isDropRangeAffected ) {
+ dragBookmark = dragRange.createBookmark( false );
+ }
+ dropBookmark = dropRange.clone().createBookmark( false );
+ if ( isDropRangeAffected ) {
+ dragBookmark = dragRange.createBookmark( false );
+ }
+
+ // Check if drop range is inside range.
+ // This is an edge case when we drop something on editable's margin/padding.
+ // That space is not treated as a part of the range we drag, so it is possible to drop there.
+ // When we drop, browser tries to find closest drop position and it finds it inside drag range. (#13453)
+ var startNode = dragBookmark.startNode,
+ endNode = dragBookmark.endNode,
+ dropNode = dropBookmark.startNode,
+ dropInsideDragRange =
+ // Must check endNode because dragRange could be collapsed in some edge cases (simulated DnD).
+ endNode &&
+ ( startNode.getPosition( dropNode ) & CKEDITOR.POSITION_PRECEDING ) &&
+ ( endNode.getPosition( dropNode ) & CKEDITOR.POSITION_FOLLOWING );
+
+ // If the drop range happens to be inside drag range change it's position to the beginning of the drag range.
+ if ( dropInsideDragRange ) {
+ // We only change position of bookmark span that is connected with dropBookmark.
+ // dropRange will be overwritten and set to the dropBookmark later.
+ dropNode.insertBefore( startNode );
+ }
+
+ // No we can safely delete content for the drag range...
+ dragRange = editor.createRange();
+ dragRange.moveToBookmark( dragBookmark );
+ editable.extractHtmlFromRange( dragRange, 1 );
+
+ // ...and paste content into the drop position.
+ dropRange = editor.createRange();
+ dropRange.moveToBookmark( dropBookmark );
+
+ // We do not select drop range, because of may be in the place we can not set the selection
+ // (e.g. between blocks, in case of block widget D&D). We put range to the paste event instead.
+ firePasteEvents( editor, { dataTransfer: dataTransfer, method: 'drop', range: dropRange }, 1 );
+
+ editor.fire( 'unlockSnapshot' );
+ },
+
+ /**
+ * Gets the range from the `drop` event.
+ *
+ * @since 4.5
+ * @param {Object} domEvent A native DOM drop event object.
+ * @param {CKEDITOR.editor} editor The source editor instance.
+ * @returns {CKEDITOR.dom.range} range at drop position.
+ */
+ getRangeAtDropPosition: function( dropEvt, editor ) {
+ var $evt = dropEvt.data.$,
+ x = $evt.clientX,
+ y = $evt.clientY,
+ $range,
+ defaultRange = editor.getSelection( true ).getRanges()[ 0 ],
+ range = editor.createRange();
+
+ // Make testing possible.
+ if ( dropEvt.data.testRange )
+ return dropEvt.data.testRange;
+
+ // Webkits.
+ if ( document.caretRangeFromPoint ) {
+ $range = editor.document.$.caretRangeFromPoint( x, y );
+ range.setStart( CKEDITOR.dom.node( $range.startContainer ), $range.startOffset );
+ range.collapse( true );
+ }
+ // FF.
+ else if ( $evt.rangeParent ) {
+ range.setStart( CKEDITOR.dom.node( $evt.rangeParent ), $evt.rangeOffset );
+ range.collapse( true );
+ }
+ // IEs 9+.
+ // We check if editable is focused to make sure that it's an internal DnD. External DnD must use the second
+ // mechanism because of http://dev.ckeditor.com/ticket/13472#comment:6.
+ else if ( CKEDITOR.env.ie && CKEDITOR.env.version > 8 && defaultRange && editor.editable().hasFocus ) {
+ // On IE 9+ range by default is where we expected it.
+ // defaultRange may be undefined if dragover was canceled (file drop).
+ return defaultRange;
+ }
+ // IE 8 and all IEs if !defaultRange or external DnD.
+ else if ( document.body.createTextRange ) {
+ // To use this method we need a focus (which may be somewhere else in case of external drop).
+ editor.focus();
+
+ $range = editor.document.getBody().$.createTextRange();
+ try {
+ var sucess = false;
+
+ // If user drop between text line IEs moveToPoint throws exception:
+ //
+ // Lorem ipsum pulvinar purus et euismod
+ //
+ // dolor sit amet,| consectetur adipiscing
+ // *
+ // vestibulum tincidunt augue eget tempus.
+ //
+ // * - drop position
+ // | - expected cursor position
+ //
+ // So we try to call moveToPoint with +-1px up to +-20px above or
+ // below original drop position to find nearest good drop position.
+ for ( var i = 0; i < 20 && !sucess; i++ ) {
+ if ( !sucess ) {
+ try {
+ $range.moveToPoint( x, y - i );
+ sucess = true;
+ } catch ( err ) {
+ }
+ }
+ if ( !sucess ) {
+ try {
+ $range.moveToPoint( x, y + i );
+ sucess = true;
+ } catch ( err ) {
+ }
+ }
+ }
+
+ if ( sucess ) {
+ var id = 'cke-temp-' + ( new Date() ).getTime();
+ $range.pasteHTML( '\u200b' );
+
+ var span = editor.document.getById( id );
+ range.moveToPosition( span, CKEDITOR.POSITION_BEFORE_START );
+ span.remove();
+ } else {
+ // If the fist method does not succeed we might be next to
+ // the short element (like header):
+ //
+ // Lorem ipsum pulvinar purus et euismod.
+ //
+ //
+ // SOME HEADER| *
+ //
+ //
+ // vestibulum tincidunt augue eget tempus.
+ //
+ // * - drop position
+ // | - expected cursor position
+ //
+ // In such situation elementFromPoint returns proper element. Using getClientRect
+ // it is possible to check if the cursor should be at the beginning or at the end
+ // of paragraph.
+ var $element = editor.document.$.elementFromPoint( x, y ),
+ element = new CKEDITOR.dom.element( $element ),
+ rect;
+
+ if ( !element.equals( editor.editable() ) && element.getName() != 'html' ) {
+ rect = element.getClientRect();
+
+ if ( x < rect.left ) {
+ range.setStartAt( element, CKEDITOR.POSITION_AFTER_START );
+ range.collapse( true );
+ } else {
+ range.setStartAt( element, CKEDITOR.POSITION_BEFORE_END );
+ range.collapse( true );
+ }
+ }
+ // If drop happens on no element elementFromPoint returns html or body.
+ //
+ // * |Lorem ipsum pulvinar purus et euismod.
+ //
+ // vestibulum tincidunt augue eget tempus.
+ //
+ // * - drop position
+ // | - expected cursor position
+ //
+ // In such case we can try to use default selection. If startContainer is not
+ // 'editable' element it is probably proper selection.
+ else if ( defaultRange && defaultRange.startContainer &&
+ !defaultRange.startContainer.equals( editor.editable() ) ) {
+ return defaultRange;
+
+ // Otherwise we can not find any drop position and we have to return null
+ // and cancel drop event.
+ } else {
+ return null;
+ }
+
+ }
+ } catch ( err ) {
+ return null;
+ }
+ } else {
+ return null;
+ }
+
+ return range;
+ },
+
+ /**
+ * This function tries to link the `evt.data.dataTransfer` property of the {@link CKEDITOR.editor#dragstart},
+ * {@link CKEDITOR.editor#dragend} and {@link CKEDITOR.editor#drop} events to a single
+ * {@link CKEDITOR.plugins.clipboard.dataTransfer} object.
+ *
+ * This method is automatically used by the core of the drag and drop functionality and
+ * usually does not have to be called manually when using the drag and drop events.
+ *
+ * This method behaves differently depending on whether the drag and drop events were fired
+ * artificially (to represent a non-native drag and drop) or whether they were caused by the native drag and drop.
+ *
+ * If the native event is not available, then it will create a new {@link CKEDITOR.plugins.clipboard.dataTransfer}
+ * instance (if it does not exist already) and will link it to this and all following event objects until
+ * the {@link #resetDragDataTransfer} method is called. It means that all three drag and drop events must be fired
+ * in order to ensure that the data transfer is bound correctly.
+ *
+ * If the native event is available, then the {@link CKEDITOR.plugins.clipboard.dataTransfer} is identified
+ * by its ID and a new instance is assigned to the `evt.data.dataTransfer` only if the ID changed or
+ * the {@link #resetDragDataTransfer} method was called.
+ *
+ * @since 4.5
+ * @param {CKEDITOR.dom.event} [evt] A drop event object.
+ * @param {CKEDITOR.editor} [sourceEditor] The source editor instance.
+ */
+ initDragDataTransfer: function( evt, sourceEditor ) {
+ // Create a new dataTransfer object based on the drop event.
+ // If this event was used on dragstart to create dataTransfer
+ // both dataTransfer objects will have the same id.
+ var nativeDataTransfer = evt.data.$ ? evt.data.$.dataTransfer : null,
+ dataTransfer = new this.dataTransfer( nativeDataTransfer, sourceEditor );
+
+ if ( !nativeDataTransfer ) {
+ // No native event.
+ if ( this.dragData ) {
+ dataTransfer = this.dragData;
+ } else {
+ this.dragData = dataTransfer;
+ }
+ } else {
+ // Native event. If there is the same id we will replace dataTransfer with the one
+ // created on drag, because it contains drag editor, drag content and so on.
+ // Otherwise (in case of drag from external source) we save new object to
+ // the global clipboard.dragData.
+ if ( this.dragData && dataTransfer.id == this.dragData.id ) {
+ dataTransfer = this.dragData;
+ } else {
+ this.dragData = dataTransfer;
+ }
+ }
+
+ evt.data.dataTransfer = dataTransfer;
+ },
+
+ /**
+ * Removes the global {@link #dragData} so the next call to {@link #initDragDataTransfer}
+ * always creates a new instance of {@link CKEDITOR.plugins.clipboard.dataTransfer}.
+ *
+ * @since 4.5
+ */
+ resetDragDataTransfer: function() {
+ this.dragData = null;
+ },
+
+ /**
+ * Global object storing the data transfer of the current drag and drop operation.
+ * Do not use it directly, use {@link #initDragDataTransfer} and {@link #resetDragDataTransfer}.
+ *
+ * Note: This object is global (meaning that it is not related to a single editor instance)
+ * in order to handle drag and drop from one editor into another.
+ *
+ * @since 4.5
+ * @private
+ * @property {CKEDITOR.plugins.clipboard.dataTransfer} dragData
+ */
+
+ /**
+ * Range object to save the drag range and remove its content after the drop.
+ *
+ * @since 4.5
+ * @private
+ * @property {CKEDITOR.dom.range} dragRange
+ */
+
+ /**
+ * Initializes and links data transfer objects based on the paste event. If the data
+ * transfer object was already initialized on this event, the function will
+ * return that object. In IE it is not possible to link copy/cut and paste events
+ * so the method always returns a new object. The same happens if there is no paste event
+ * passed to the method.
+ *
+ * @since 4.5
+ * @param {CKEDITOR.dom.event} [evt] A paste event object.
+ * @param {CKEDITOR.editor} [sourceEditor] The source editor instance.
+ * @returns {CKEDITOR.plugins.clipboard.dataTransfer} The data transfer object.
+ */
+ initPasteDataTransfer: function( evt, sourceEditor ) {
+ if ( !this.isCustomCopyCutSupported ) {
+ // Edge does not support custom copy/cut, but it have some useful data in the clipboardData (#13755).
+ return new this.dataTransfer( ( CKEDITOR.env.edge && evt && evt.data.$ && evt.data.$.clipboardData ) || null, sourceEditor );
+ } else if ( evt && evt.data && evt.data.$ ) {
+ var dataTransfer = new this.dataTransfer( evt.data.$.clipboardData, sourceEditor );
+
+ if ( this.copyCutData && dataTransfer.id == this.copyCutData.id ) {
+ dataTransfer = this.copyCutData;
+ dataTransfer.$ = evt.data.$.clipboardData;
+ } else {
+ this.copyCutData = dataTransfer;
+ }
+
+ return dataTransfer;
+ } else {
+ return new this.dataTransfer( null, sourceEditor );
+ }
+ },
+
+ /**
+ * Prevents dropping on the specified element.
+ *
+ * @since 4.5
+ * @param {CKEDITOR.dom.element} element The element on which dropping should be disabled.
+ */
+ preventDefaultDropOnElement: function( element ) {
+ element && element.on( 'dragover', preventDefaultSetDropEffectToNone );
+ }
+ };
+
+ // Data type used to link drag and drop events.
+ //
+ // In IE URL data type is buggie and there is no way to mark drag & drop without
+ // modifying text data (which would be displayed if user drop content to the textarea)
+ // so we just read dragged text.
+ //
+ // In Chrome and Firefox we can use custom data types.
+ var clipboardIdDataType = CKEDITOR.plugins.clipboard.isCustomDataTypesSupported ? 'cke/id' : 'Text';
+ /**
+ * Facade for the native `dataTransfer`/`clipboadData` object to hide all differences
+ * between browsers.
+ *
+ * @since 4.5
+ * @class CKEDITOR.plugins.clipboard.dataTransfer
+ * @constructor Creates a class instance.
+ * @param {Object} [nativeDataTransfer] A native data transfer object.
+ * @param {CKEDITOR.editor} [editor] The source editor instance. If the editor is defined, dataValue will
+ * be created based on the editor content and the type will be 'html'.
+ */
+ CKEDITOR.plugins.clipboard.dataTransfer = function( nativeDataTransfer, editor ) {
+ if ( nativeDataTransfer ) {
+ this.$ = nativeDataTransfer;
+ }
+
+ this._ = {
+ metaRegExp: /^/i,
+ bodyRegExp: /([\s\S]*)<\/body>/i,
+ fragmentRegExp: //g,
+
+ data: {},
+ files: [],
+
+ normalizeType: function( type ) {
+ type = type.toLowerCase();
+
+ if ( type == 'text' || type == 'text/plain' ) {
+ return 'Text'; // IE support only Text and URL;
+ } else if ( type == 'url' ) {
+ return 'URL'; // IE support only Text and URL;
+ } else {
+ return type;
+ }
+ }
+ };
+
+ // Check if ID is already created.
+ this.id = this.getData( clipboardIdDataType );
+
+ // If there is no ID we need to create it. Different browsers needs different ID.
+ if ( !this.id ) {
+ if ( clipboardIdDataType == 'Text' ) {
+ // For IE10+ only Text data type is supported and we have to compare dragged
+ // and dropped text. If the ID is not set it means that empty string was dragged
+ // (ex. image with no alt). We change null to empty string.
+ this.id = '';
+ } else {
+ // String for custom data type.
+ this.id = 'cke-' + CKEDITOR.tools.getUniqueId();
+ }
+ }
+
+ // In IE10+ we can not use any data type besides text, so we do not call setData.
+ if ( clipboardIdDataType != 'Text' ) {
+ // Try to set ID so it will be passed from the drag to the drop event.
+ // On some browsers with some event it is not possible to setData so we
+ // need to catch exceptions.
+ try {
+ this.$.setData( clipboardIdDataType, this.id );
+ } catch ( err ) {}
+ }
+
+ if ( editor ) {
+ this.sourceEditor = editor;
+
+ this.setData( 'text/html', editor.getSelectedHtml( 1 ) );
+
+ // Without setData( 'text', ... ) on dragstart there is no drop event in Safari.
+ // Also 'text' data is empty as drop to the textarea does not work if we do not put there text.
+ if ( clipboardIdDataType != 'Text' && !this.getData( 'text/plain' ) ) {
+ this.setData( 'text/plain', editor.getSelection().getSelectedText() );
+ }
+ }
+
+ /**
+ * Data transfer ID used to bind all dataTransfer
+ * objects based on the same event (e.g. in drag and drop events).
+ *
+ * @readonly
+ * @property {String} id
+ */
+
+ /**
+ * A native DOM event object.
+ *
+ * @readonly
+ * @property {Object} $
+ */
+
+ /**
+ * Source editor — the editor where the drag starts.
+ * Might be undefined if the drag starts outside the editor (e.g. when dropping files to the editor).
+ *
+ * @readonly
+ * @property {CKEDITOR.editor} sourceEditor
+ */
+
+ /**
+ * Private properties and methods.
+ *
+ * @private
+ * @property {Object} _
+ */
+ };
+
+ /**
+ * Data transfer operation (drag and drop or copy and paste) started and ended in the same
+ * editor instance.
+ *
+ * @since 4.5
+ * @readonly
+ * @property {Number} [=1]
+ * @member CKEDITOR
+ */
+ CKEDITOR.DATA_TRANSFER_INTERNAL = 1;
+
+ /**
+ * Data transfer operation (drag and drop or copy and paste) started in one editor
+ * instance and ended in another.
+ *
+ * @since 4.5
+ * @readonly
+ * @property {Number} [=2]
+ * @member CKEDITOR
+ */
+ CKEDITOR.DATA_TRANSFER_CROSS_EDITORS = 2;
+
+ /**
+ * Data transfer operation (drag and drop or copy and paste) started outside of the editor.
+ * The source of the data may be a textarea, HTML, another application, etc.
+ *
+ * @since 4.5
+ * @readonly
+ * @property {Number} [=3]
+ * @member CKEDITOR
+ */
+ CKEDITOR.DATA_TRANSFER_EXTERNAL = 3;
+
+ CKEDITOR.plugins.clipboard.dataTransfer.prototype = {
+ /**
+ * Facade for the native `getData` method.
+ *
+ * @param {String} type The type of data to retrieve.
+ * @returns {String} type Stored data for the given type or an empty string if the data for that type does not exist.
+ */
+ getData: function( type ) {
+ function isEmpty( data ) {
+ return data === undefined || data === null || data === '';
+ }
+
+ type = this._.normalizeType( type );
+
+ var data = this._.data[ type ],
+ result;
+
+ if ( isEmpty( data ) ) {
+ try {
+ data = this.$.getData( type );
+ } catch ( e ) {}
+ }
+
+ if ( isEmpty( data ) ) {
+ data = '';
+ }
+
+ // Some browsers add at the begging of the HTML data
+ // or surround it with ...(some content) and (some content)
+ // This code removes meta tags and returns only the contents of the element if found. Note that
+ // some significant content may be placed outside Start/EndFragment comments so it's kept.
+ //
+ // See #13583 for more details.
+ if ( type == 'text/html' ) {
+ data = data.replace( this._.metaRegExp, '' );
+
+ // Keep only contents of the element
+ result = this._.bodyRegExp.exec( data );
+ if ( result && result.length ) {
+ data = result[ 1 ];
+
+ // Remove also comments.
+ data = data.replace( this._.fragmentRegExp, '' );
+ }
+ }
+ // Firefox on Linux put files paths as a text/plain data if there are files
+ // in the dataTransfer object. We need to hide it, because files should be
+ // handled on paste only if dataValue is empty.
+ else if ( type == 'Text' && CKEDITOR.env.gecko && this.getFilesCount() &&
+ data.substring( 0, 7 ) == 'file://' ) {
+ data = '';
+ }
+
+ return data;
+ },
+
+ /**
+ * Facade for the native `setData` method.
+ *
+ * @param {String} type The type of data to retrieve.
+ * @param {String} value The data to add.
+ */
+ setData: function( type, value ) {
+ type = this._.normalizeType( type );
+
+ this._.data[ type ] = value;
+
+ // There is "Unexpected call to method or property access." error if you try
+ // to set data of unsupported type on IE.
+ if ( !CKEDITOR.plugins.clipboard.isCustomDataTypesSupported && type != 'URL' && type != 'Text' ) {
+ return;
+ }
+
+ // If we use the text type to bind the ID, then if someone tries to set the text, we must also
+ // update ID accordingly. #13468.
+ if ( clipboardIdDataType == 'Text' && type == 'Text' ) {
+ this.id = value;
+ }
+
+ try {
+ this.$.setData( type, value );
+ } catch ( e ) {}
+ },
+
+ /**
+ * Gets the data transfer type.
+ *
+ * @param {CKEDITOR.editor} targetEditor The drop/paste target editor instance.
+ * @returns {Number} Possible values: {@link CKEDITOR#DATA_TRANSFER_INTERNAL},
+ * {@link CKEDITOR#DATA_TRANSFER_CROSS_EDITORS}, {@link CKEDITOR#DATA_TRANSFER_EXTERNAL}.
+ */
+ getTransferType: function( targetEditor ) {
+ if ( !this.sourceEditor ) {
+ return CKEDITOR.DATA_TRANSFER_EXTERNAL;
+ } else if ( this.sourceEditor == targetEditor ) {
+ return CKEDITOR.DATA_TRANSFER_INTERNAL;
+ } else {
+ return CKEDITOR.DATA_TRANSFER_CROSS_EDITORS;
+ }
+ },
+
+ /**
+ * Copies the data from the native data transfer to a private cache.
+ * This function is needed because the data from the native data transfer
+ * is available only synchronously to the event listener. It is not possible
+ * to get the data asynchronously, after a timeout, and the {@link CKEDITOR.editor#paste}
+ * event is fired asynchronously — hence the need for caching the data.
+ */
+ cacheData: function() {
+ if ( !this.$ ) {
+ return;
+ }
+
+ var that = this,
+ i, file;
+
+ function getAndSetData( type ) {
+ type = that._.normalizeType( type );
+
+ var data = that.getData( type );
+ if ( data ) {
+ that._.data[ type ] = data;
+ }
+ }
+
+ // Copy data.
+ if ( CKEDITOR.plugins.clipboard.isCustomDataTypesSupported ) {
+ if ( this.$.types ) {
+ for ( i = 0; i < this.$.types.length; i++ ) {
+ getAndSetData( this.$.types[ i ] );
+ }
+ }
+ } else {
+ getAndSetData( 'Text' );
+ getAndSetData( 'URL' );
+ }
+
+ // Copy files references.
+ file = this._getImageFromClipboard();
+ if ( ( this.$ && this.$.files ) || file ) {
+ this._.files = [];
+
+ // Edge have empty files property with no length (#13755).
+ if ( this.$.files && this.$.files.length ) {
+ for ( i = 0; i < this.$.files.length; i++ ) {
+ this._.files.push( this.$.files[ i ] );
+ }
+ }
+
+ // Don't include $.items if both $.files and $.items contains files, because,
+ // according to spec and browsers behavior, they contain the same files.
+ if ( this._.files.length === 0 && file ) {
+ this._.files.push( file );
+ }
+ }
+ },
+
+ /**
+ * Gets the number of files in the dataTransfer object.
+ *
+ * @returns {Number} The number of files.
+ */
+ getFilesCount: function() {
+ if ( this._.files.length ) {
+ return this._.files.length;
+ }
+
+ if ( this.$ && this.$.files && this.$.files.length ) {
+ return this.$.files.length;
+ }
+
+ return this._getImageFromClipboard() ? 1 : 0;
+ },
+
+ /**
+ * Gets the file at the index given.
+ *
+ * @param {Number} i Index.
+ * @returns {File} File instance.
+ */
+ getFile: function( i ) {
+ if ( this._.files.length ) {
+ return this._.files[ i ];
+ }
+
+ if ( this.$ && this.$.files && this.$.files.length ) {
+ return this.$.files[ i ];
+ }
+
+ // File or null if the file was not found.
+ return i === 0 ? this._getImageFromClipboard() : undefined;
+ },
+
+ /**
+ * Checks if the data transfer contains any data.
+ *
+ * @returns {Boolean} `true` if the object contains no data.
+ */
+ isEmpty: function() {
+ var typesToCheck = {},
+ type;
+
+ // If dataTransfer contains files it is not empty.
+ if ( this.getFilesCount() ) {
+ return false;
+ }
+
+ // Add custom types.
+ for ( type in this._.data ) {
+ typesToCheck[ type ] = 1;
+ }
+
+ // Add native types.
+ if ( this.$ ) {
+ if ( CKEDITOR.plugins.clipboard.isCustomDataTypesSupported ) {
+ if ( this.$.types ) {
+ for ( var i = 0; i < this.$.types.length; i++ ) {
+ typesToCheck[ this.$.types[ i ] ] = 1;
+ }
+ }
+ } else {
+ typesToCheck.Text = 1;
+ typesToCheck.URL = 1;
+ }
+ }
+
+ // Remove ID.
+ if ( clipboardIdDataType != 'Text' ) {
+ typesToCheck[ clipboardIdDataType ] = 0;
+ }
+
+ for ( type in typesToCheck ) {
+ if ( typesToCheck[ type ] && this.getData( type ) !== '' ) {
+ return false;
+ }
+ }
+
+ return true;
+ },
+
+ /**
+ * When the content of the clipboard is pasted in Chrome, the clipboard data object has an empty `files` property,
+ * but it is possible to get the file as `items[0].getAsFile();` (#12961).
+ *
+ * @private
+ * @returns {File} File instance or `null` if not found.
+ */
+ _getImageFromClipboard: function() {
+ var file;
+
+ if ( this.$ && this.$.items && this.$.items[ 0 ] ) {
+ try {
+ file = this.$.items[ 0 ].getAsFile();
+ // Duck typing
+ if ( file && file.type ) {
+ return file;
+ }
+ } catch ( err ) {
+ // noop
+ }
+ }
+
+ return undefined;
+ }
+ };
+} )();
+
+/**
+ * The default content type that is used when pasted data cannot be clearly recognized as HTML or text.
+ *
+ * For example: `'foo'` may come from a plain text editor or a website. It is not possible to recognize the content
+ * type in this case, so the default type will be used. At the same time it is clear that `'example text'` is
+ * HTML and its origin is a web page, email or another rich text editor.
+ *
+ * **Note:** If content type is text, then styles of the paste context are preserved.
+ *
+ * CKEDITOR.config.clipboard_defaultContentType = 'text';
+ *
+ * See also the {@link CKEDITOR.editor#paste} event and read more about the integration with clipboard
+ * in the [Clipboard Deep Dive guide](#!/guide/dev_clipboard).
+ *
+ * @since 4.0
+ * @cfg {'html'/'text'} [clipboard_defaultContentType='html']
+ * @member CKEDITOR.config
+ */
+
+/**
+ * Fired after the user initiated a paste action, but before the data is inserted into the editor.
+ * The listeners to this event are able to process the content before its insertion into the document.
+ *
+ * Read more about the integration with clipboard in the [Clipboard Deep Dive guide](#!/guide/dev_clipboard).
+ *
+ * See also:
+ *
+ * * the {@link CKEDITOR.config#pasteFilter} option,
+ * * the {@link CKEDITOR.editor#drop} event,
+ * * the {@link CKEDITOR.plugins.clipboard.dataTransfer} class.
+ *
+ * @since 3.1
+ * @event paste
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ * @param data
+ * @param {String} data.type The type of data in `data.dataValue`. Usually `'html'` or `'text'`, but for listeners
+ * with a priority smaller than `6` it may also be `'auto'` which means that the content type has not been recognised yet
+ * (this will be done by the content type sniffer that listens with priority `6`).
+ * @param {String} data.dataValue HTML to be pasted.
+ * @param {String} data.method Indicates the data transfer method. It could be drag and drop or copy and paste.
+ * Possible values: `'drop'`, `'paste'`. Introduced in CKEditor 4.5.
+ * @param {CKEDITOR.plugins.clipboard.dataTransfer} data.dataTransfer Facade for the native dataTransfer object
+ * which provides access to various data types and files, and passes some data between linked events
+ * (like drag and drop). Introduced in CKEditor 4.5.
+ * @param {Boolean} [data.dontFilter=false] Whether the {@link CKEDITOR.editor#pasteFilter paste filter} should not
+ * be applied to data. This option has no effect when `data.type` equals `'text'` which means that for instance
+ * {@link CKEDITOR.config#forcePasteAsPlainText} has a higher priority. Introduced in CKEditor 4.5.
+ */
+
+/**
+ * Fired before the {@link #paste} event. Allows to preset data type.
+ *
+ * **Note:** This event is deprecated. Add a `0` priority listener for the
+ * {@link #paste} event instead.
+ *
+ * @deprecated
+ * @event beforePaste
+ * @member CKEDITOR.editor
+ */
+
+ /**
+ * Fired after the {@link #paste} event if content was modified. Note that if the paste
+ * event does not insert any data, the `afterPaste` event will not be fired.
+ *
+ * @event afterPaste
+ * @member CKEDITOR.editor
+ */
+
+/**
+ * Internal event to open the Paste dialog window.
+ *
+ * @private
+ * @event pasteDialog
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ * @param {Function} [data] Callback that will be passed to {@link CKEDITOR.editor#openDialog}.
+ */
+
+/**
+ * Facade for the native `drop` event. Fired when the native `drop` event occurs.
+ *
+ * **Note:** To manipulate dropped data, use the {@link CKEDITOR.editor#paste} event.
+ * Use the `drop` event only to control drag and drop operations (e.g. to prevent the ability to drop some content).
+ *
+ * Read more about integration with drag and drop in the [Clipboard Deep Dive guide](#!/guide/dev_clipboard).
+ *
+ * See also:
+ *
+ * * The {@link CKEDITOR.editor#paste} event,
+ * * The {@link CKEDITOR.editor#dragstart} and {@link CKEDITOR.editor#dragend} events,
+ * * The {@link CKEDITOR.plugins.clipboard.dataTransfer} class.
+ *
+ * @since 4.5
+ * @event drop
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ * @param data
+ * @param {Object} data.$ Native drop event.
+ * @param {CKEDITOR.dom.node} data.target Drop target.
+ * @param {CKEDITOR.plugins.clipboard.dataTransfer} data.dataTransfer DataTransfer facade.
+ * @param {CKEDITOR.dom.range} data.dragRange Drag range, lets you manipulate the drag range.
+ * Note that dragged HTML is saved as `text/html` data on `dragstart` so if you change the drag range
+ * on drop, dropped HTML will not change. You need to change it manually using
+ * {@link CKEDITOR.plugins.clipboard.dataTransfer#setData dataTransfer.setData}.
+ * @param {CKEDITOR.dom.range} data.dropRange Drop range, lets you manipulate the drop range.
+ */
+
+/**
+ * Facade for the native `dragstart` event. Fired when the native `dragstart` event occurs.
+ *
+ * This event can be canceled in order to block the drag start operation. It can also be fired to mimic the start of the drag and drop
+ * operation. For instance, the `widget` plugin uses this option to integrate its custom block widget drag and drop with
+ * the entire system.
+ *
+ * Read more about integration with drag and drop in the [Clipboard Deep Dive guide](#!/guide/dev_clipboard).
+ *
+ * See also:
+ *
+ * * The {@link CKEDITOR.editor#paste} event,
+ * * The {@link CKEDITOR.editor#drop} and {@link CKEDITOR.editor#dragend} events,
+ * * The {@link CKEDITOR.plugins.clipboard.dataTransfer} class.
+ *
+ * @since 4.5
+ * @event dragstart
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ * @param data
+ * @param {Object} data.$ Native dragstart event.
+ * @param {CKEDITOR.dom.node} data.target Drag target.
+ * @param {CKEDITOR.plugins.clipboard.dataTransfer} data.dataTransfer DataTransfer facade.
+ */
+
+/**
+ * Facade for the native `dragend` event. Fired when the native `dragend` event occurs.
+ *
+ * Read more about integration with drag and drop in the [Clipboard Deep Dive guide](#!/guide/dev_clipboard).
+ *
+ * See also:
+ *
+ * * The {@link CKEDITOR.editor#paste} event,
+ * * The {@link CKEDITOR.editor#drop} and {@link CKEDITOR.editor#dragend} events,
+ * * The {@link CKEDITOR.plugins.clipboard.dataTransfer} class.
+ *
+ * @since 4.5
+ * @event dragend
+ * @member CKEDITOR.editor
+ * @param {CKEDITOR.editor} editor This editor instance.
+ * @param data
+ * @param {Object} data.$ Native dragend event.
+ * @param {CKEDITOR.dom.node} data.target Drag target.
+ * @param {CKEDITOR.plugins.clipboard.dataTransfer} data.dataTransfer DataTransfer facade.
+ */
+
+/**
+ * Defines a filter which is applied to external data pasted or dropped into the editor. Possible values are:
+ *
+ * * `'plain-text'` – Content will be pasted as a plain text.
+ * * `'semantic-content'` – Known tags (except `div`, `span`) with all attributes (except
+ * `style` and `class`) will be kept.
+ * * `'h1 h2 p div'` – Custom rules compatible with {@link CKEDITOR.filter}.
+ * * `null` – Content will not be filtered by the paste filter (but it still may be filtered
+ * by [Advanced Content Filter](#!/guide/dev_advanced_content_filter)). This value can be used to
+ * disable the paste filter in Chrome and Safari, where this option defaults to `'semantic-content'`.
+ *
+ * Example:
+ *
+ * config.pasteFilter = 'plain-text';
+ *
+ * Custom setting:
+ *
+ * config.pasteFilter = 'h1 h2 p ul ol li; img[!src, alt]; a[!href]';
+ *
+ * Based on this configuration option, a proper {@link CKEDITOR.filter} instance will be defined and assigned to the editor
+ * as a {@link CKEDITOR.editor#pasteFilter}. You can tweak the paste filter settings on the fly on this object
+ * as well as delete or replace it.
+ *
+ * var editor = CKEDITOR.replace( 'editor', {
+ * pasteFilter: 'semantic-content'
+ * } );
+ *
+ * editor.on( 'instanceReady', function() {
+ * // The result of this will be that all semantic content will be preserved
+ * // except tables.
+ * editor.pasteFilter.disallow( 'table' );
+ * } );
+ *
+ * Note that the paste filter is applied only to **external** data. There are three data sources:
+ *
+ * * copied and pasted in the same editor (internal),
+ * * copied from one editor and pasted into another (cross-editor),
+ * * coming from all other sources like websites, MS Word, etc. (external).
+ *
+ * If {@link CKEDITOR.config#allowedContent Advanced Content Filter} is not disabled, then
+ * it will also be applied to pasted and dropped data. The paste filter job is to "normalize"
+ * external data which often needs to be handled differently than content produced by the editor.
+ *
+ * This setting defaults to `'semantic-content'` in Chrome, Opera and Safari (all Blink and Webkit based browsers)
+ * due to messy HTML which these browsers keep in the clipboard. In other browsers it defaults to `null`.
+ *
+ * @since 4.5
+ * @cfg {String} [pasteFilter='semantic-content' in Chrome and Safari and `null` in other browsers]
+ * @member CKEDITOR.config
+ */
+
+/**
+ * {@link CKEDITOR.filter Content filter} which is used when external data is pasted or dropped into the editor
+ * or a forced paste as plain text occurs.
+ *
+ * This object might be used on the fly to define rules for pasted external content.
+ * This object is available and used if the {@link CKEDITOR.plugins.clipboard clipboard} plugin is enabled and
+ * {@link CKEDITOR.config#pasteFilter} or {@link CKEDITOR.config#forcePasteAsPlainText} was defined.
+ *
+ * To enable the filter:
+ *
+ * var editor = CKEDITOR.replace( 'editor', {
+ * pasteFilter: 'plain-text'
+ * } );
+ *
+ * You can also modify the filter on the fly later on:
+ *
+ * editor.pasteFilter = new CKEDITOR.filter( 'p h1 h2; a[!href]' );
+ *
+ * Note that the paste filter is only applied to **external** data. There are three data sources:
+ *
+ * * copied and pasted in the same editor (internal),
+ * * copied from one editor and pasted into another (cross-editor),
+ * * coming from all other sources like websites, MS Word, etc. (external).
+ *
+ * If {@link CKEDITOR.config#allowedContent Advanced Content Filter} is not disabled, then
+ * it will also be applied to pasted and dropped data. The paste filter job is to "normalize"
+ * external data which often needs to be handled differently than content produced by the editor.
+ *
+ * @since 4.5
+ * @readonly
+ * @property {CKEDITOR.filter} [pasteFilter]
+ * @member CKEDITOR.editor
+ */
--
cgit v1.2.3