Don't send text/html to clipboard for note copy, since we don't have rich-text notes and copying HTML on Windows just loses newlines (due to unsupported white-space: pre-wrap in Word and OO).

This commit is contained in:
Dan Stillman 2008-06-12 06:34:12 +00:00
parent c57143b3cb
commit 116c292f44
2 changed files with 11 additions and 1 deletions

View File

@ -1475,7 +1475,9 @@ Zotero.ItemTreeView.prototype.onDragStart = function (evt,transferData,action)
else if (mode.indexOf('bibliography') == 0) {
var content = Zotero.QuickCopy.getContentFromItems(items, format);
transferData.data.addDataForFlavour("text/unicode", content.text);
transferData.data.addDataForFlavour("text/html", content.html);
if (content.html) {
transferData.data.addDataForFlavour("text/html", content.html);
}
}
else {
Components.utils.reportError("Invalid Quick Copy mode '" + mode + "'");

View File

@ -175,10 +175,18 @@ Zotero.QuickCopy = new function() {
html = html.toXMLString();
// Don't copy HTML, since we don't have rich-text notes and
// copying HTML on Windows just loses newlines (due to
// unsupported white-space: pre-wrap in Word and OO).
/*
var content = {
text: contentType == "html" ? html : content.join('\n\n\n'),
html: html
};
*/
var content = {
text: contentType == "html" ? html : content.join('\n\n\n')
};
return content;
}