From ee6c386bae1edc593917590676d00c2de15a7a64 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 9 Oct 2010 17:21:25 +0000 Subject: [PATCH] Run Cut/Copy/Paste commands in notes with chrome privileges so they work --- chrome/content/zotero/bindings/styled-textbox.xml | 5 +++++ chrome/content/zotero/tinymce/note.html | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml index 16b97706f6..1a8e9f8530 100644 --- a/chrome/content/zotero/bindings/styled-textbox.xml +++ b/chrome/content/zotero/bindings/styled-textbox.xml @@ -408,6 +408,11 @@ if (self._eventHandler) { self._iframe.contentWindow.wrappedJSObject.handleEvent = self._eventHandler; } + + // Run Cut/Copy/Paste with chrome privileges + self._iframe.contentWindow.wrappedJSObject.zoteroExecCommand = function (doc, command, ui, value) { + return doc.execCommand(command, ui, value); + } }; this._iframe.addEventListener("DOMContentLoaded", listener, false); diff --git a/chrome/content/zotero/tinymce/note.html b/chrome/content/zotero/tinymce/note.html index 75060f2633..507fe6d0fc 100755 --- a/chrome/content/zotero/tinymce/note.html +++ b/chrome/content/zotero/tinymce/note.html @@ -2,8 +2,8 @@ - - +