One of my biggest mistakes with this blog was not finding a WordPress plugin that would allow me to write my posts with markdown; to this day I still need to write posts in 'Visual' mode and then manually convert the post to HTML for 'Text' mode. One of these days I want to convert existing posts to Markdown and then enable a plugin that will convert Markdown to HTML. This painful process made me ask myself: is there a way I can use Node.js JavaScript to convert HTML to Markdown? There is, and it's called Turndown by Dom Christie.
Convert HTML to Markdown with Node.jsNov 01, 2020 Strapi Admin Customization - WYSIWYG replacement. This tutorial explains how to easily do an Admin Customization in Strapi. This example shows how to replace the markdown rich text editor by a WYSIWYG editor. These templates are Strapi applications containing existing collection-types and single-types suited for the appropriate use case, and data. In this tutorial we'll use the Blog template and connect a Gatsby application to it. Note: for this tutorial, we will use yarn as your package manager. Create your Strapi backend folder using the Blog. Oct 23, 2019 This tutorial explains how to easily do an Admin Customization in Strapi. This example shows how to replace the markdown rich text editor by a WYSIWYG editor. The text is stored in the database as Markdown and exposed by your Strapi API in the same format. We advise you to use a node module such as Showdown to convert it into HTML in your frontend. That's not how it should work at all.
Strapi Markdown To Html Editor
Start by installing Turndown:
Strapi Markdown To Html Software
Then use Turndown's simple API to convert HTML to markdown:
You can use the interactive Turndown demo to experiment with its capabilities. Turndown has a number of options and allows you to use filters to keep elements you believe could be at risk for improper conversion.
Strapi Markdown To Html Free
Most developers look for a Markdown to HTML solution so it's rate to find myself in a position to need to convert HTML to Markdown. I look forward to migrating my site's content to Markdown so that writing posts is much less stressful in the future!