Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:client_coding:javascript_api [2019/08/18 05:41] – [Running Ad Hoc JavaScript in Zotero] Add examples zuphilip | dev:client_coding:javascript_api [2019/10/20 06:46] – [API Methods] zuphilip | ||
---|---|---|---|
Line 242: | Line 242: | ||
<code javascript> | <code javascript> | ||
- | ===== Managing citations and bibliographies | + | ==== Managing citations and bibliographies ==== |
TODO: this is pretty sparse. | TODO: this is pretty sparse. | ||
- | ==== Getting a bibliography for an array of items: | + | === Getting a bibliography for an array of items: === |
Here we use Zotero' | Here we use Zotero' | ||
- | specified in Zotero' | + | specified in Zotero' |
+ | bibliography from all currently selected items. | ||
- | First we start with a list of as in the previous entry. | + | <code javascript> |
- | + | var qc = Zotero.QuickCopy; | |
- | <code javascript> | + | var format |
- | var biblio | + | if (format.split(" |
- | var biblio_html_format = cite.html; | + | |
- | var biblio_txt | + | } |
+ | var biblio = qc.getContentFromItems(items, | ||
+ | var biblio_html_format = biblio.html; | ||
+ | var biblio_txt = biblio.text; | ||
</ | </ | ||
- | ==== Get a list of available styles | + | If you instead want to have the citation string then simply replace the 7th |
+ | line with '' | ||
+ | |||
+ | |||
+ | === Get a list of available styles === | ||
<code javascript> | <code javascript> | ||
Line 271: | Line 279: | ||
</ | </ | ||
- | TODO: get citations. | + | TODO: change the style. |
especially RTF | especially RTF | ||