Is there a makeMarkdown function?
I'm trying to make a quote function to quote a forum post, which is in markup, but when clicking the quote button I'd like to the the markup and convert that forum post into Markdown and put it into the textarea, is there such a function?
No
@tivie I have found this gem.But i have no idea why i can not access it.Does showdown support reversed conversion?
@smoleniuch It's a feature we're developing for version 2.0
Is there a timeline on when 2.0 will be released?
I have a PR ready for showdownjs/ng-showdown that adds makeMarkdown directive to the ng-showdown directive, but it simply needs the latest version of showdown.
PS: I'd love to help contribute to showdown, recently introduced it into my own project and really like the library. Let me know if there's any features for 2.0 I can help work on.
I think I must be missing something – isn't this project described as "a bidirectional MD to HTML to MD converter"?
@charlie-s I did not find any information about bidirectional flow, can you provide a sample??
Anyway the feature would be very useful.
@charlie-s The bidirectional is available in master and develop branches and to the soon to be released version 2.0-alpha-1
@smoleniuch @Gacnt @charlie-s @mattkwiecien @DougBeney @jdempster @Blaza @matthew-inamdar @jdhankins @circleart @ryantuck
Just pushed the reverse converter to 1.x branch. You can expect a 1.9.0 release with an [EXPERIMENTAL] reverse parser tomorrow.
Donate
As you know, ShowdownJS is a free library and it will remain free forever. However, maintaining and improving the library costs time and money. If you like my work and find the library useful, please donate through Patreon or directly through paypal!! Your contribution will be greatly appreciated and help us continue to develop this awesome library.
version 1.9.0 released
I understand that the makeMarkdown function has been released, but it does not work in node...
window is not defined
Is there some way around this?
@sojs-coder @tivie bumping this. Still encountering window is not defined. Any workarounds here?

Yes. The master build should be compatible with node. Uses a new dependency, JSDOM, to replace the browser's DOM Parser.
It doesn't really document how-to on Node, nor does it automatically pick up JSDOM, nor does it give relevant error message (ReferenceError: window is not defined).
For the quick fix, but well, I really wanted to avoid attaching to globalThis...
import { JSDOM } from 'jsdom'
;(globalThis as any).window = new JSDOM('', {}).window
January 2023. "bidirectional" markdown tool still doesn't convert back to markdown, even ChatGPT is confused.
This issue still seems to be present in the npm release.
const bodyMarkdown = converter.makeMarkdown(
bodyHtml,
new JSDOM("", {}).window.document,
);
this works for me with JSDOM and showdown 2.1.0