Skip to content

gooddavvy/html-to-markdown-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT gets a bonus for helping me make this library.

It's nice! Wanna try it out? The function name is htmlToMarkdown. Just add the following code to your HTML:

<script src="https://HTML-to-Markdown-Converter.goodnessdavid.repl.co/index.js"></script>

And there you have it! You can now do something like this:

const htmlContent = document.getElementById('html-content');
const markdownOutput = document.getElementById('markdown-output');

markdownOutput.innerHTML = `<pre><code>${htmlToMarkdown(htmlContent)}</pre></code>`

I hope you like it, and again, me and ChatGPT worked on it together!

BTW take a look at this: image