From a09e99ea1cf1a80cc247c95f42d4e9650af3c800 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 8 May 2005 14:56:34 +0000 Subject: [PATCH] Added new information to the HTMLArea popup error when trying to use Paste and made it translatable. --- lang/en/editor.php | 1 + lib/editor/htmlarea.php | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lang/en/editor.php b/lang/en/editor.php index cd6350c8945..efbb71c476c 100644 --- a/lang/en/editor.php +++ b/lang/en/editor.php @@ -28,6 +28,7 @@ $string['createanchor'] = 'Create anchor'; $string['createfolder'] = 'Create folder'; $string['createlink'] = 'Insert Web Link'; $string['cut'] = 'Cut selection'; +$string['cutpastemozilla'] = 'Unfortunately, you can not currently use normal keyboard shortcuts (or even the Paste button) for Pasting text into this online editor. This is because of a security feature that is built in to some versions of Mozilla and Firefox browsers.

There are three known workarounds you can try:
(1) Instead of CTRL-v, use SHIFT-Insert
(2) Use the Edit->Paste menu in your browser
(3) Change the preferences in your browser by editing the user.js file.

Click the OK button below for more help, or Cancel to return to the editor'; $string['delete'] = 'Delete'; $string['filebrowser'] = 'File Browser'; $string['forecolor'] = 'Font Color'; diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index 99699ef4f65..fc21d8c947e 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -1882,12 +1882,8 @@ HTMLArea.prototype.execCommand = function(cmdID, UI, param) { } } catch (e) { if (HTMLArea.is_gecko) { - if (confirm("Unprivileged scripts cannot access Cut/Copy/Paste programatically " + - "for security reasons. Click OK to see a technical note at mozilla.org " + - "which shows you how to allow a script to access the clipboard." + - "\n\nFor more information HOW TO enable Cut/Copy/Paste see moodle -discussion: " + - "\nhttp://moodle.org/mod/forum/discuss.php?d=5880")) - window.open("http://mozilla.org/editor/midasdemo/securityprefs.html"); + if (confirm("', '\\n', get_string('cutpastemozilla','editor')) ?>")) + window.open("http://moodle.org/mozillahelp"); } } break;