Skip to content

[IMP] extensions: add copy to markdown button #13998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mattismegevand
Copy link

@mattismegevand mattismegevand commented Jul 11, 2025

Add a "Copy to Markdown" button using Turndown to convert HTML docs to Markdown, with support for syntax-highlighted code blocks. This will allow an easier usage of LLM.

Here's how it look (copy button is next to version selector, right window show raw output and preview):
image

@robodoo
Copy link
Collaborator

robodoo commented Jul 11, 2025

Pull request status dashboard

@C3POdoo C3POdoo requested review from a team July 11, 2025 16:13
@mattismegevand mattismegevand marked this pull request as draft July 11, 2025 16:22
@mattismegevand mattismegevand force-pushed the 18.0-copy_markdown_button-mmeg branch 3 times, most recently from 9896def to 765962b Compare July 11, 2025 18:45
Add a "Copy to Markdown" button using Turndown to convert HTML docs to Markdown, with support for syntax-highlighted code blocks.
This will allow an easier usage of LLM.
@mattismegevand mattismegevand force-pushed the 18.0-copy_markdown_button-mmeg branch from 765962b to 75d756a Compare July 11, 2025 18:52
@mattismegevand mattismegevand marked this pull request as ready for review July 11, 2025 19:11
Copy link
Collaborator

@AntoineVDV AntoineVDV left a comment

Choose a reason for hiding this comment

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

Hi, could you elaborate on the purpose of this PR and/or link a related task?

From the current "allow an easier usage of LLM" explanation, I assume that it'd be because LLMs digest Markdown more easily than HTML, but it's not clear at all to me why the translation should happen in JS rather than on a server, and why every user should now have a very confusing copy to md button.

@mattismegevand
Copy link
Author

Hello! Yes, this is something I’ve seen in other documentation systems and found very practical.
It’s especially useful for dev docs, as it allows you to copy clean Markdown and ask questions to LLMs with better context and fewer hallucinations.
I chose a client-side approach to avoid any backend changes, but I’m happy to adjust if you think it would be better handled server-side let me know!

@AntoineVDV
Copy link
Collaborator

Ok, I see. I thought it was meant for a specific project, like a RAG chatbot fetching information from the documentation, hence my suggestion to pre-process the information on the server.

For a general-purpose "copy to clipboard and paste in chatbot prompt" usage, I'm sure that the current approach fits very well. It might be perfect for power users of other technical documentation, but our readers are primarily functional people and not that tech-savvy.

WDYT @xpl-odoo @auva-odoo?

@mattismegevand
Copy link
Author

I understand your point, potentially we could limit this feature to the dev docs only?
So that we don't confuse non-tech people.

@xpl-odoo
Copy link
Contributor

Currently, I doubt it would be helpful for the average reader of the user's part of the documentation; the help chatbot should be enough in most cases.

@AntoineVDV
Copy link
Collaborator

I understand your point, potentially we could limit this feature to the dev docs only? So that we don't confuse non-tech people.

To be honest, I doubt this feature's usefulness would outweigh its maintenance cost in our dev docs. The information is scattered across a bazillion pages that all large LLMs have already digested thousands of times anyway. The per-page export and manually feeding limitations make me believe she should not go forward with this.

@mattismegevand
Copy link
Author

Ok closing the PR then

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.

4 participants