官网:https://pandao.github.io/editor.md/
一款还不错的markdown编辑器

首先下载完整的editor.md:
https://github.com/pandao/editor.md/archive/master.zip
或者国内的gitee:
https://gitee.com/pandao/editor.md

将文件夹命名为:editormd

引入到html中:

<link rel="stylesheet" type="text/css" href="/static/common/lib/editormd/css/editormd.css" />

以下可以放到页面底部,因为我放在了公共footer中,所以假如了判断

<script src="/static/common/lib/editormd/editormd.min.js"></script>
<script type="text/javascript">
    $(function() {
        var editor = editormd("editormd", {
            width: "100%",
            height: 640,
            toolbarIcons: 'diy',
            path: "/static/common/lib/editormd/lib/",
            imageUpload: true,
            htmlDecode: "style,script,iframe",
            imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
            imageUploadURL: "./upload.php",
        });
    });
</script>

如以上参数,我配置了上传接口、自定义了编辑器图标
diy的图标参数:

["undo","redo","|","bold","del","italic","quote","h1","h2","h3","|","list-ul","list-ol","hr","link","image","table","code","|","watch","preview","fullscreen","|","help", "info"]

上传部分:
自己做好文件存储,然后上传接口返回: