Skip to content

Releases: GitHubNewbie0/odf-kit

14 bug fixes and added OASIS ODF Validator to CI

06 Mar 22:27

Choose a tag to compare

v0.5.1

Fixed 7 bugs in template engine (tag boundary parsing, nested empty spans, meta.xml processing)
Fixed 7 bugs in reader (single-quoted attributes, numeric character references, CharStyle tri-state, styles.xml integration, HTML5 charset)
Added OASIS ODF Validator to CI — generated output now validated against the ODF spec on every push
410 tests passing

Template Engine

24 Feb 23:19

Choose a tag to compare

Template Engine
v0.3.0 adds a template engine to odf-kit. Create a .odt template in LibreOffice with {placeholders}, fill it with data from JavaScript.
Added

Template engine — fillTemplate() loads an existing .odt, replaces {placeholders} with data, returns a new .odt
Loops — {#items}...{/items} repeats content for each array item
Conditionals — {#showSection}...{/showSection} includes/removes based on truthy/falsy
Dot notation — {user.address.city} for nested data
Placeholder healer — automatically reassembles placeholders fragmented by LibreOffice across text:span elements
Boundary expansion — section markers expand through wrapping XML to prevent orphaned tags
Header/footer templates — placeholders in headers and footers processed alongside body
120 new tests — 222 total

See CHANGELOG.md for full details.

v0.1.0

12 Feb 03:44

Choose a tag to compare

Changelog

All notable changes to odf-kit will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

0.1.0 - 2026-02-11

Initial release. Complete ODT (text document) support.

Added

  • Core — ODF ZIP packaging (mimetype stored uncompressed as first entry), XML generation, namespace management, manifest, metadata
  • Paragraphs and headings — Plain text or formatted via builder callback, heading levels 1–6
  • Text formatting — Bold, italic, underline, strikethrough, superscript, subscript, font size, font family, text color, highlight color. Boolean shortcuts (bold: true) and CSS-style properties (fontWeight: "bold") both accepted. Style deduplication for identical formatting.
  • Tables — Array-of-arrays for simple tables, builder callback for full control. Column widths, cell borders (table-level, cell-level, per-side), background colors (hex and named CSS colors), cell merging (colSpan/rowSpan), rich text in cells.
  • Page layout — Page size (A4 default), margins, orientation (portrait/landscape). Landscape auto-swaps A4 dimensions.
  • Headers and footers — Plain text (with ### for page numbers) or formatted via builder callback with addPageNumber().
  • Page breaksaddPageBreak() inserts a new page.
  • Lists — Bullet and numbered lists. String array for simple lists, builder callback for formatting and nesting (up to 6 levels).
  • Tab stops — Left, center, right alignment with configurable positions.
  • Images — Embedded PNG, JPEG, GIF, SVG, WebP, BMP, TIFF. Standalone (paragraph anchor) or inline (as-character anchor). Images stored in ZIP under Pictures/ with correct MIME types in manifest.
  • Hyperlinks — External URLs and internal bookmark links (#name). Optional text formatting on links.
  • Bookmarks — Named anchor points for internal navigation via addBookmark().
  • Method chaining — All methods return this for fluent API usage.
  • TypeScript — Full type definitions with JSDoc comments. ESM-only, Node.js 22+.
  • Testing — 102 tests covering all features. Validated against LibreOffice 24.2.