前言
记录一下编辑器的安装使用过程,可能会有错误 editor.md 是一个markdown 编辑器,可至github 下载它的发行版本 百度看见有它的漏洞
editor.md-releases
Editor.md - 开源在线Markdown编辑器
一、环境
phpstudy
phpstorm
editor.md
二、环境搭建
开启一下apache 或nginx 服务,ftp 、mysql 可以不用开启

把下载好的editor.md 文件夹放到phpstudy 的WWW 文件夹

这两个示例文件夹,访问一下http://127.0.0.1/test/editor.md/examples/simple.html 看看editor.md 能不能用的

出现如下的界面后表示editor.md 生效了

三、创建编辑器
下方的几个文件和文件夹需要用到
editor.md/css/editormd.css
editor.md/editormd.js
editor.md/examples/js/jquery.min.js
editor.md/lib
如果examples 需要删除的话,就需要将jquery 移动到其他地方 创建一个index.html ,具体的使用方式都在注释中

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="editor.md/css/editormd.css">
<script src="jquery.min.js"></script>
<script src="editor.md/editormd.js"></script>
<script type="text/javascript">
$(function() {
var editor = editormd("editor", {
width: "100%",
height: "500px",
path : "editor.md/lib/"
});
});
</script>
</head>
<body>
<div id="editor">
<textarea>### Hello Editor.md !</textarea>
<textarea>123123</textarea>
</div>
</body>
</html>

|