diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index fab483eeb..ac88072e9 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -860,6 +860,13 @@ Zotero.Integration.Document.prototype._updateDocument = function(forceCitations, field.setCode( (this._session.data.prefs.storeReferences ? "ITEM CSL_CITATION" : "ITEM") +" "+fieldCode); + + if(this._session.data.prefs.fieldType === "ReferenceMark" && isRich) { + // For ReferenceMarks with formatting, we need to set the text again, because + // setting the field code removes formatting from the mark. I don't like this. + field.setText(citation.properties.custom ? citation.properties.custom + : citation.properties.formattedCitation, isRich); + } } }