Get started with turndown CDN
MIT licensed
Turndown: library converts Markdown/HTML to clean, valid HTML/DOM output.
Tags:- converter
- html
- markdown
- javascript
- html-to-markdown
- browser
- node
Stable version
Copied!
How to start using turndown CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with turndown CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/turndown/7.1.3/turndown.js"></script>
<style>
pre { white-space: pre-wrap; }
</style>
</head>
<body>
<script>
const markdown = `
# Heading 1
## Heading 2
**Bold text**
*Italic text*
`;
const processor = new turndown({
presets: [
'default',
'commonmark',
'gfm',
],
});
const html = processor.process(markdown);
document.body.innerHTML = html;
</script>
</body>
</html>
Copied!
Copied!