Ladies and gentlemen, cold Moon is sending you a wave of benefits today. We all know that the Markdown editor is a great tool for writing. Cool Moon is here to show you how to implement the Markdown editor into your blog.
First, let’s take a look at the renderings:
So what can we do? Cold Moon has found an open source Markdown Editor called editor. md, but the official project is no longer maintained. So leng Moon will download the plug-in into my public account. We only need to pay attention to lengyue wechat public number: senior Lengyue. Re: Markdown. The cold moon will send you the sorted information.
Well, after downloading the plug-in, you just need to follow my introduction below to be successful.
First of all, you see the directory structure is like this, index.html is the official give a sample code, you can refer to use. As follows:
<link rel="stylesheet" href="editormd/css/editormd.css" /> <div id="test-editor"> <textarea style="display:none;" Editor.md** is an open source, embeddable online Editor (component) for Markdown, built based on CodeMirror, jQuery, and Marked. < / textarea > < / div > < script SRC = "https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js" > < / script > < script src="editormd/editormd.min.js"></script> <script type="text/javascript"> $(function() { var editor = editormd("test-editor", { // width : "100%", // height : "100%", path : "editormd/lib/" }); }); </script>Copy the code
All you need to do is put this code where you want to introduce MarkDown, change the CSS and JS paths to your address, and you have successfully introduced MarkDown to your blog.
If this blog helps you, you can help lengyue click a like or add a concern oh!
Welcome to follow my official account: Lengyue, get exclusive learning resources and daily dry goods push.
If you are interested in my features, you can also follow my blog at Guoyu7.com