[BUGFIX] RTE: Paste as plain text doesn't work in Safari (Mac only)
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 10 Oct 2012 16:42:15 +0000 (12:42 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 15 Oct 2012 01:12:00 +0000 (03:12 +0200)
Problem: Access to clipboard is denied.
Solution: Redirect paste to hidden section.

Change-Id: I196065b34c38990ab99251855da542e08fe5ce9e
Resolves: #35356
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/15626
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/plugins/PlainText/plain-text.js

index 6a7ce07..38f687a 100644 (file)
@@ -251,8 +251,8 @@ HTMLArea.PlainText = Ext.extend(HTMLArea.Plugin, {
                if (!this.getButton('PasteToggle').inactive) {
                        switch (this.currentBehaviour) {
                                case 'plainText':
-                                               // Only IE and WebKit will allow access to the clipboard content, in plain text only however
-                                       if (Ext.isIE || Ext.isWebKit) {
+                                               // Only IE and Chrome will allow access to the clipboard content, in plain text only however
+                                       if (Ext.isIE || Ext.isChrome) {
                                                var clipboardText = this.grabClipboardText(event);
                                                if (clipboardText) {
                                                        this.editor.insertHTML(clipboardText);