Skip to content

[Feature Request] Allow selecting diagram output format (png | svg) for markdown export #445

@christophdebaene

Description

@christophdebaene

Summary

markdownExport currently converts diagram blocks (including plantuml) to PNG files in the exported markdown.

Please add an option to choose the output image format (at least png and svg) during markdown export.

Problem

For technical docs, SVG is often preferred because it is:

  • scalable without quality loss
  • smaller/easier to diff in some cases
  • better for print and high-DPI rendering

Right now, even when PlantUML can render SVG, markdown export still writes PNG references.

Proposed Solution

Add a configurable export option (e.g. image_format, diagram_output_format, plantuml_format, ...)

  • notebook config: image_format: "png" | "svg"
  • and/or export option: engine.markdownExport({ imageFormat: "svg" })

Default can remain png for backward compatibility.

Expected Behavior

When diagramOutputFormat: "svg" is set:

  • fenced diagram blocks (starting with plantuml) are exported as .svg files
  • generated markdown references .svg files instead of .png
  • existing behavior remains unchanged when format is not set (or set to png)

Additional Context

I’m using Crossnote programmatically in a pipeline and need SVG output for docs publishing workflows.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions