From 8070a22d08ba6b1a3527f08380be6b76f5d8f86a Mon Sep 17 00:00:00 2001
From: Dan Stillman
Date: Mon, 27 Oct 2008 16:39:18 +0000
Subject: [PATCH] Load TinyMCE as chrome to avoid NoScript blockage
---
chrome/content/zotero/bindings/styled-textbox.xml | 14 +++++---------
chrome/content/zotero/tinymce/integration.html | 2 +-
chrome/content/zotero/tinymce/note.html | 4 ++--
chrome/content/zotero/tinymce/noteview.html | 4 ++--
chrome/content/zotero/tinymce/tiny_mce.js | 8 ++++++--
5 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml
index a56f32fe46..86a5788eb9 100644
--- a/chrome/content/zotero/bindings/styled-textbox.xml
+++ b/chrome/content/zotero/bindings/styled-textbox.xml
@@ -249,17 +249,14 @@
var ios = Components.classes["@mozilla.org/network/io-service;1"].
getService(Components.interfaces.nsIIOService);
var uri = ios.newURI("chrome://zotero/content/tinymce/" + htmlFile + ".html", null, null);
- var chromeReg = Components.classes["@mozilla.org/chrome/chrome-registry;1"].
- getService(Components.interfaces.nsIChromeRegistry);
- var fileURI = chromeReg.convertChromeURL(uri);
- Zotero.debug("Loading " + fileURI.spec);
+ Zotero.debug("Loading " + uri.spec);
// Register handler for deferred setting of content
var self = this;
var listener = function() {
self._iframe.removeEventListener("DOMContentLoaded", listener, false);
- var editor = self._iframe.contentWindow.wrappedJSObject.tinyMCE.get("tinymce");
+ var editor = self._iframe.contentWindow.tinyMCE.get("tinymce");
editor.onInit.add(function() {
self._editor = editor;
@@ -269,13 +266,12 @@
});
if (self._eventHandler) {
- self._iframe.contentWindow.wrappedJSObject.handleEvent = self._eventHandler;
+ self._iframe.contentWindow.handleEvent = self._eventHandler;
}
};
this._iframe.addEventListener("DOMContentLoaded", listener, false);
- Zotero.debug("Loading " + fileURI.spec);
- this._iframe.webNavigation.loadURI(fileURI.spec,
+ this._iframe.webNavigation.loadURI(uri.spec,
Components.interfaces.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
]]>
@@ -284,7 +280,7 @@
-
diff --git a/chrome/content/zotero/tinymce/integration.html b/chrome/content/zotero/tinymce/integration.html
index 1baa5b5550..8608db4ae3 100755
--- a/chrome/content/zotero/tinymce/integration.html
+++ b/chrome/content/zotero/tinymce/integration.html
@@ -26,7 +26,7 @@ html, body {
// General options
mode : "none",
theme : "advanced",
- content_css : "../../../skin/default/zotero/tinymce/integration-content.css",
+ content_css : "chrome://zotero/skin/tinymce/integration-content.css",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,|,sub,sup,|,removeformat",
diff --git a/chrome/content/zotero/tinymce/note.html b/chrome/content/zotero/tinymce/note.html
index 1064566458..27ce11a12f 100755
--- a/chrome/content/zotero/tinymce/note.html
+++ b/chrome/content/zotero/tinymce/note.html
@@ -2,14 +2,14 @@
TinyMCE
-
+