markdown编辑器的下载和使用
记得选排名前几的
<section id="global">
<div style=" min-height: 700px;" class="container-fluid cm-container-white">
<div id="test-editormd">
<textarea style="display: none;" name="" id="" cols="30" rows="10"></textarea>
</div>
<script src="md/js/editormd.min.js"></script>
<script>
var testEditor;
$(function () {
testEditor = editormd("test-editormd", {
width: "90%",
height: 640,
syncScrolling: "single",
path: "md/lib/",
imageUpload: true,
imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
imageUploadURL: "/file",
saveHTMLToTextarea: true
});
});
</script>
</div>
</section>
注意点
因为这个样式库必须是依赖 jQuery 的,所以要在 script 引入 md的 js之前,把 jQuery 脚本引入,不然就会报错
本文地址:https://blog.csdn.net/qq_43923045/article/details/107877535