Hacker News new | ask | show | jobs
by tracker1 4091 days ago
I have a set of utils I use to sanitize input to markdown... It's relatively limited, but it works for my needs. You could present WYSIWYG to the user, but still have a preview that sanitizes and presents the sanitized output.

I'm using this for import/export description fields... Then I replace h1/h2 with h3. It works pretty well.

https://www.npmjs.com/package/cc-text-utils