diff --git a/chrome/content/zotero/preferences/preferences_export.js b/chrome/content/zotero/preferences/preferences_export.js
index 55afdab23d..f440ad2224 100644
--- a/chrome/content/zotero/preferences/preferences_export.js
+++ b/chrome/content/zotero/preferences/preferences_export.js
@@ -38,6 +38,17 @@ Zotero_Preferences.Export = {
}),
+ getQuickCopyTranslators: async function () {
+ var translation = new Zotero.Translate("export");
+ var translators = await translation.getTranslators();
+ translators.sort((a, b) => {
+ var collation = Zotero.getLocaleCollation();
+ return collation.compareString(1, a.label, b.label);
+ });
+ return translators;
+ },
+
+
/*
* Builds the main Quick Copy drop-down from the current global pref
*/
@@ -47,12 +58,7 @@ Zotero_Preferences.Export = {
format = Zotero.QuickCopy.unserializeSetting(format);
var menulist = document.getElementById("zotero-quickCopy-menu");
yield Zotero.Styles.init();
- var translation = new Zotero.Translate("export");
- var translators = yield translation.getTranslators();
- translators.sort((a, b) => {
- var collation = Zotero.getLocaleCollation();
- return collation.compareString(1, a.label, b.label);
- });
+ var translators = yield this.getQuickCopyTranslators();
this.buildQuickCopyFormatDropDown(
menulist, format.contentType, format, translators
);
@@ -143,6 +149,13 @@ Zotero_Preferences.Export = {
},
+ onCopyAsHTMLChange: async function (checked) {
+ var menulist = document.getElementById('zotero-quickCopy-menu');
+ var translators = await this.getQuickCopyTranslators();
+ this.buildQuickCopyFormatDropDown(menulist, checked ? 'html' : '', null, translators);
+ },
+
+
updateQuickCopyUI: function () {
var format = document.getElementById('zotero-quickCopy-menu').value;
diff --git a/chrome/content/zotero/preferences/preferences_export.xul b/chrome/content/zotero/preferences/preferences_export.xul
index 07580d0910..d2e40b1522 100644
--- a/chrome/content/zotero/preferences/preferences_export.xul
+++ b/chrome/content/zotero/preferences/preferences_export.xul
@@ -61,7 +61,7 @@
+ oncommand="Zotero_Preferences.Export.onCopyAsHTMLChange(this.checked)"/>