HTML code for website

I am looking for a simple way to get HTML code as text from zotero for adding references to a website. The common styles seem to produce a lot of extra code when "copy as HTML" is checked. My editor is dreamweaver but I would have the same issues in any text editor. When I use the CSL editor it interprets the tags.

Here is a sample of the code that I am trying to generate:
<a href="javascript:void(0);" onmouseover="return overlib('Grondahl, L.O., "The Copper-Cuprous-Oxide Rectifier and Photoelectric Cell", <i>Review of Modern Physics</i>, Vol. 5, p. 141, 1933.');" onmouseout="return nd();">Grondahl</a>

The overlib javascript generates a pop up on mouse over.
  • The HTML Zotero generates includes COinS, which allows Zotero and other tools that understand COinS to pull the data back in. This is a good thing. Zotero certainly isn't going to generate bad JS-laced markup for some random third-party hover function for you, though you could possibly create a custom CSL that did so (and not use "Copy as HTML" mode).
  • what do you mean by "the csl editor"?
    If you want csl to produce < and > you have to write them as xml code,
    i.e.
    & lt;
    and
    & gt;

    without the spaces after the ampersand. I think you should be able to create the citation above using csl, might just take some coding on your part.

    I'm thinking
    <layout prefix="& lt;a href="javascript:void(0);" onmouseover="return overlib('" >
    etc.
  • On the "bad" JS Dan mentions, there are plenty of good, free, JS solutions that do not require you to hack the HTML like this (JQuery comes to mind, which has many such plug-ins).
  • I agree that it is not for Zotero to create every outdated JS hack as a style but some of us work with legacy code - old habits. For now I will create a style along the lines of what Adam suggests.

    Long term I would like a better way to handle references for the electronic textbook I have on photovoltaics (http://pvcdrom.pveducation.org). I guess one model would be wikipedia but it uses more weblinks than scientific papers. Are there other sites that people think is a good model for referring to journal articles etc.?

    I use Zotero for all my other references (>1000) and am very pleased with it. Thanks!
  • If you wanted to go the Wikipedia route, you could use MediaWiki (same software that runs Wikipedia), locked down so that only you could edit it, along with Wikipedia citation templates, which Zotero natively supports (and handle much more than web links). I don't know exactly what's involved in setting up MediaWiki, however, so this might end up being more work than you have in mind.
  • MediaWiki is pretty easy to setup as fair as LAMP stuff goes.
  • I wrote csl code to create the format I needed using the & lt; syntax etc. I was thrown at first because when using chrome://zotero/content/tools/csledit.xul I see the interpreted code rather than the HTML tags. All is good for the final style and I can use ctrl-alt-c to get the HTML tags to paste.
    One of the things I really like about Zotero is that it is so flexible and it has these forums for support.
    I am still mulling over changing to Mediawiki/LAMP
  • I solved this problem for my purposes, with a CSL style I export html code, doing the following:

    CSL examples (between & and # no space)

    <text variable="URL" prefix="& #60;a href=||" suffix="||& #62;URL& #60;/a& #62; "/>

    and

    <text value=" & #60;small& #62;& #60;a href=||http://es.wikipedia.org/wiki/Especial:FuentesDeLibros/"/>
    <text variable="ISBN"/>
    <text value="#Globales||& #62; ISBN "/>
    <text variable="ISBN"/>
    <text value="& #60;/small& #62;"/>

    and

    <text variable="abstract" prefix="& #60;a onmouseover=||Tip(\" suffix="\, WIDTH, -240)|| onmouseout=||UnTip()||& #62;INFO& #60;/a& #62;"/>

    In the output, by a text editor I replace all || with ". It works.
Sign In or Register to comment.