Commit Graph
10 Commits
Author SHA1 Message Date
gemmaro 225b09dbc7 docs: Correct Asciidoctor name casing. (#11782) 2026-07-29 09:54:16 +02:00
John MacFarlane 5ee0c74f5c wasm/index.js: include filter to embed images for pdf-via-typst.
Auto-inject embed_images filter for PDF via Typst. Otherwise
conversion fails because we can't write the images in a temporary
directory in the WASM sandbox. See jgm/pandoc#11584.
2026-04-16 11:38:54 +02:00
John MacFarlane 7fe6f218a4 Wasm gui: catch errors loading pandoc 2026-02-06 01:25:41 +01:00
John MacFarlane 061055d18e wasm gui: Don't block everything while pandoc.wasm loads. 2026-02-05 10:51:30 +01:00
John MacFarlane 26d1e601b3 wasm: Get reader/writer names dynamically.
Support "input-formats" and "output-formats" in wasm query.
2026-02-02 12:56:02 +01:00
John MacFarlane 8c6e906f83 wasm: expose "version" in query and put it in page footer on demo. 2026-02-02 12:13:07 +01:00
John MacFarlane f91faefbeb wasm: change interface.
We now provide two functions: convert and query.
extensions_for_format has been dropped, as query can do the
work.

convert is what pandoc used to be.

query takes a JSON object describing the information needed,
and returns information. Currently only "extensions-for-format"
is implemented.

Also: the use of multiple main-is causes problems with cabal.
Instead, we use pandoc.hs as main throughout, but change the
hs-src-dir for wasm.
2026-02-02 11:58:18 +01:00
John MacFarlane 648999286d wasm: Rename wasm_main -> convert. 2026-02-02 09:12:14 +01:00
John MacFarlane bf34bb6dbd Small wasm interface tweaks.
- Add footer.
- Fix convert tabs.
- Add Help link.
- Add Verbosity dropdown.
- Fix console message about files being undefined.
2026-02-01 14:50:50 +01:00
John MacFarlane 4b26f50118 Add support for compiling pandoc.wasm.
'make pandoc.wasm' will compile a wasm version of pandoc.

This also adds a 'repl' flag to pandoc-lua-engine, so that
support for a Lua repl can be disabled for the wasm build.

A new wasm directory contains:

- pandoc.js, a JavaScript wrapper for pandoc.wasm
- index.html + index.js, a web app exposing all of pandoc's
  functionality in a GUI interface
- a set of illustrative examples that can be loaded from the web app

Most of the code in index.html and index.js has been produced in
interaction with Claude code.
2026-02-01 14:50:50 +01:00