Skip to content

New tool: Word → Markdown / HTML #22

Open

Description

@kingrishabdugar

The Word → PDF tool already parses .docx (paragraphs, headings, lists, tables, images) into HTML inside src/engine/office.ts. Exposing that as a download gives two popular converters almost for free.

Approach

  • Word → HTML: return the generated HTML as a standalone .html file (images inlined as data URLs).
  • Word → Markdown: convert the same structure to Markdown (# headings, -/1. lists, pipe tables, **bold**/*italic*).
  • Two registry entries in src/site.ts (e.g. word-to-markdown, word-to-html) sharing one op with a format preset, like pdf-to-text/pdf-to-markdown do.

Done when

  • tests/fixtures/rich.docx → Markdown keeps its heading levels, list items and table cells (unit test).

Activity

  1. AmariAugustin commented on Oct 5, 2026

    @AmariAugustin
    Contributor

    Hello @kingrishabdugar i will also pick this one too.

  2. kingrishabdugar commented on Oct 5, 2026

    @kingrishabdugar
    OwnerAuthor

    Thanks for the interest, @AmariAugustin, really appreciate the enthusiasm!

    To keep things fair during Hacktoberfest, I'm assigning one issue per contributor at a time, so other first-time contributors get a chance too. You already have #6, so let's start there. Once your PR for #6 is open, comment here again and if this one is still free I'll happily assign it to you.

    Thanks again for contributing to Fizzdoc!

  3. TristanKeller commented on Oct 9, 2026

    @TristanKeller

    Hi @kingrishabdugar, I'm working with @AmariAugustin (his PR for #6 is #91). Could you assign this one to me?

  4. kingrishabdugar commented on Oct 9, 2026

    @kingrishabdugar
    OwnerAuthor

    Hi @TristanKeller, welcome, and thanks for offering! I've assigned #22 to you.

    A few pointers to get started:

    • Word files are already read in src/engine/office.ts (docxToHtml turns a .docx into HTML for Word to PDF), so most of the work is reusing that and saving the result as an .html or .md file instead of printing it.
    • For Markdown, headings, bold/italic, lists, links, tables and images (as alt text) would be a great first version. Anything that can't be carried over is fine to drop, as long as the text itself is all there.
    • A new tool needs an entry in src/site.ts, its strings in src/i18n.ts, and a test that opens the output and checks its contents (see the existing tests in tests/ for the style). Translations for the other languages can come in a follow-up; I'm happy to help with those.
    • Please run npm run check and npm run test:e2e before opening the PR, and keep it to this one tool.

    If anything is unclear, just ask here. Looking forward to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions