diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml
index 62088782a..45083b1d1 100644
--- a/chrome/content/zotero/bindings/styled-textbox.xml
+++ b/chrome/content/zotero/bindings/styled-textbox.xml
@@ -38,21 +38,32 @@
this._buttons = {
'italic':document.getAnonymousElementByAttribute(this, "anonid", "rt-italic"),
'bold':document.getAnonymousElementByAttribute(this, "anonid", "rt-bold"),
- 'underline':document.getAnonymousElementByAttribute(this, "anonid", "rt-underline")
+ 'underline':document.getAnonymousElementByAttribute(this, "anonid", "rt-underline"),
+ 'superscript':document.getAnonymousElementByAttribute(this, "anonid", "rt-superscript"),
+ 'subscript':document.getAnonymousElementByAttribute(this, "anonid", "rt-subscript")
};
// globals
this._formatMap = {
"Integration":{
"\\":"\\\\",
+ "&":"&",
+ "<":"<",
+ ">":">",
"":"\\i ",
"":"\\i0 ",
"":"\\b ",
"":"\\b0 ",
"":"\\ul ",
"":"\\ul0 ",
- "
":"\n",
- "&":"&"
+ "
":"\x0B",
+ "":"\\super ",
+ "":"\\super0 ",
+ "":"\\sub ",
+ "":"\\sub0 ",
+ // there's no way to mimic a tab stop in CSS without
+ // tables, which wouldn't work here.
+ ' ':"\t"
}
};
@@ -114,7 +125,7 @@
"+html+"");
+ this._browser.contentDocument.write(''+html+"");
this._browser.contentDocument.close();
this._browser.contentDocument.designMode = (this._readonly ? "off" : "on");
try {
@@ -235,6 +277,12 @@
+
+
+
+
diff --git a/chrome/skin/default/zotero/bindings/styled-textbox.css b/chrome/skin/default/zotero/bindings/styled-textbox.css
index 9f46a5182..1f32cb080 100644
--- a/chrome/skin/default/zotero/bindings/styled-textbox.css
+++ b/chrome/skin/default/zotero/bindings/styled-textbox.css
@@ -10,6 +10,14 @@
list-style-image: url('chrome://zotero/skin/text_underline.png');
}
+.rt-superscript {
+ list-style-image: url('chrome://zotero/skin/text_superscript.png');
+}
+
+.rt-subscript {
+ list-style-image: url('chrome://zotero/skin/text_subscript.png');
+}
+
.rt-toolbar {
padding: 2px;
}