Is it possible to have Quick Copy output as HTML when using a translator/exporter?

When the default/quick copy export format is set to an export format, the "Copy as HTML" option disappears.

Is it possible to enable this in anyway. I'm trying to setup a way to export links to specific zotero items (see here: http://forums.zotero.org/discussion/23885/using-zoteroselect-to-create-links-but-not-via-a-translator), and it mostly works, but it comes through as text, rather than HTML, which is a bit annoying.
  • no it's not. The html formatting is coded into the CSL processor, it doesn't exist for export translators (and it doesn't make much sense for the most part - what would, e.g. bibtex be in html?).

    That said, you can modify the translator to produce whatever output you want, including, of course, html.
  • Oh, that is a shame. I really thought this might solve the problem of linking to Zotero items from Zotero notes and other places.

    Obviously it doesn't make sense for BibTex, but BibTex isn't the only output format.

    I've got the translator *producing* HTML; it's just not even half as useful if when you paste it into Word or a Zotero note it actually comes through as text, instead of HTML.
  • I've got the translator *producing* HTML; it's just not even half as useful if when you paste it into Word or a Zotero note it actually comes through as text, instead of HTML.
    sorry, I don't understand that distinction. With HTML output selected, Zotero will give you something like this for a citation:

    <div class="csl-bib-body" style="line-height: 1.35; padding-left: 2em; text-indent:-2em;">
    <div class="csl-entry">Karcher, Sebastian, and Ben Ross Schneider. 2012. “Business politics in Latin America: Investigating structurer, preferences, and influence.” In <i>Routledge Handbook of Latin American Politics</i>, eds. Peter R. Kingstone and Deborah J. Yashar. New York, NY: Routledge, p. 273–284.</div>
    <span class="Z3988" title="url_ver=Z39.88-2004&amp;ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fzotero.org%3A2&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=Business%20politics%20in%20Latin%20America%3A%20Investigating%20structurer%2C%20preferences%2C%20and%20influence&amp;rft.place=New%20York%2C%20NY&amp;rft.publisher=Routledge&amp;rft.aufirst=Sebastian&amp;rft.aulast=Karcher&amp;rft.au=Sebastian%20Karcher&amp;rft.au=Ben%20Ross%20Schneider&amp;rft.au=Peter%20R.%20Kingstone&amp;rft.au=Deborah%20J.%20Yashar&amp;rft.date=2012&amp;rft.pages=273-284&amp;rft.spage=273&amp;rft.epage=284"/>
    </div>


    you can very much create the same thing with a translator. Or am I missing something?
  • It's not just about the content that is placed on the clipboard. But it is also about the type of clipboard entry created. You can store HTML code on the clipboard as plain text, and when you paste it, you'll get all the HTML.

    Or you can store it as rich text, and when you paste it (into something like Word) it will retain the formatting and embed any hyperlinks.

    Zotero seems to be copying the content of the exporters in a way such that it is only recognised as plain text on the clipboard, so that when you paste it into Word, you don't get hyperlinks, you just get HTML code.

    Right, so I can select an item, and using 'Nature' as my citation format, I can click 'Copy as HTML', and when I paste it in Word I get the title as italicised. I don't see any <i> tags. I don't see all the <div>s.

    When I use my exporter, even though its generating HTML, it's not being put on the clipboard in whatever format it needs to be put on the clipboard as or with whatever setting/flag needs to be set. As a result, when I paste it (into Word), I do see the <a> tag, and I don't see a hyperlink: I see the code for the hyperlink.

    (See here :http://msdn.microsoft.com/en-us/library/windows/desktop/ms649013(v=vs.85).aspx)
  • edited June 26, 2012
    It's possible a translator could set a setting that the Quick Copy code could read, but I'm not sure—Simon would have to comment on the translator side.

    But since none of the built-in export translators generate HTML (I don't think), this isn't much of a priority. Maybe you can find a third-party utility to modify the data on the clipboard.
  • Yep, that's true and totally understandable.

    On the other hand, creating links to items that can be inserted in notes and external documents is something that gets requested fairly frequently from what I've seen - it'd be amazing if it could actually be implemented.
Sign In or Register to comment.