[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 00:59:54 +0000 (02:59 +0200)
Problem: Access to clipboard is denied.
Solution: Redirect paste to hidden section.

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

index c46fae2..fb8827d 100644 (file)
@@ -246,8 +246,8 @@ HTMLArea.PlainText = HTMLArea.Plugin.extend({
                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);