Skip to content

Add export to word - #146

Open
MatejFrnka wants to merge 4 commits into
developfrom
feature/72-word-export
Open

Add export to word#146
MatejFrnka wants to merge 4 commits into
developfrom
feature/72-word-export

Conversation

@MatejFrnka

@MatejFrnka MatejFrnka commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Ended up writing custom logic for markdown to word conversion. This is not ideal, but I prefer it over the following other options:

  • Using pandoc: this requires installing the pandoc-binary, which would make the deployment more annoying
  • Using third party library: I only found libraries with around ~50 github stars, I would rather use a more adopted library
  • Converting on client instead of on server: There also aren't that many widely adopted libraries for md to docx. It also increases the size of the plugin making the loading slower.

Based on this, I ended up implementing a simple convertor using two estabilished libraries (one for parsing md, one for editing docx).

closes #72

@MatejFrnka MatejFrnka changed the title Feature/72 word export Add export to word Aug 16, 2026
@MatejFrnka
MatejFrnka marked this pull request as ready for review August 16, 2026 09:51
@MatejFrnka

MatejFrnka commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator Author

Review after merging PR #142

@MatejFrnka
MatejFrnka force-pushed the feature/72-word-export branch from aef7481 to 2ad681e Compare August 17, 2026 19:46
@@ -0,0 +1,140 @@
import { useEffect, useRef, useState } from 'react'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be consistent in the dropdown item titles with the naming of the formats in the Document template:

Image

@@ -1,43 +1,30 @@
import { useCallback, useState } from 'react'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this warning after downloading the word file, maybe it is an issue in my editor on macos, but I'm not sure.

Image Image

@@ -0,0 +1,54 @@
.root {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the custom implementation, are you sure that all of the concepts that can occur in the md/word are implemented?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not everything is supported, for example. Images are not supported since they cannot be generated by the LLM anyway. I will check all the core features like tables, headings, lists, sublists, ...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add download format Microsoft Word

2 participants