Open yaohunzhanyue opened 4 years ago
Leanote's Markdown Editor originally forked from Stackedit-v3.1.14. The Stackedit source is under Apache License (http://www.apache.org/licenses/LICENSE-2.0) and the code updated by Leanote is under GPL v2.
Please install node and gulp firstly.
node
gulp
> gulp # build & minify res-min/main-v2.js (https://github.com/leanote/leanote/blob/master/public/dist/main-v2.js), res-min/main-v2.min.js (https://github.com/leanote/leanote/blob/master/public/dist/main-v2.min.js)
> node server.js
See: http://localhost:3001/editor.html
Copy res-min/main-v2.min.js to leanote's path /public/dist/.
res-min/main-v2.min.js
/public/dist/
Update node-dev.html with:
<script> initPage(); window.require = { baseUrl: '/public', }; </script> <!-- pro_markdown_js --> <!-- dev --> <script src="/js/require.js"></script> <script src="/public/dist/main-v2.min.js"></script> <!-- /dev --> <script src="/public/js/plugins/main.js"></script> </body>
Replace node-dev.html with:
<script> initPage(); window.require = { baseUrl: '/public/res', // link to res }; </script> <!-- pro_markdown_js --> <!-- dev --> <script src="/js/require.js"></script> <script src="/public/res/main.js"></script> <!-- /dev --> <!-- <script src="/public/js/plugins/main.js"></script> --> </body>
确保在此之前安装了node, gulp
> gulp # 生成 res-min/main-v2.js (https://github.com/leanote/leanote/blob/master/public/dist/main-v2.js) 和 res-min/main-v2.min.js (https://github.com/leanote/leanote/blob/master/public/dist/main-v2.min.js)
访问: http://localhost:3001/editor.html
将 res-min/main-v2.min.js 复制到leanote的 /public/dist/ 下
node-dev.html:
<script> initPage(); // 当tinymce.dev.js时, 请注释require window.require = { baseUrl: '/public', }; </script> <!-- pro_markdown_js --> <!-- dev --> <script src="/js/require.js"></script> <script src="/public/dist/main-v2.min.js"></script> <!-- /dev --> <script src="/public/js/plugins/main.js"></script> </body>
替换node-dev.html
<script> initPage(); window.require = { baseUrl: '/public/res', // res指向源码 }; </script> <!-- pro_markdown_js --> <!-- dev --> <script src="/js/require.js"></script> <script src="/public/res/main.js"></script> <!-- /dev --> <!-- 不要 <script src="/public/js/plugins/main.js"></script> --> </body>
Markdown Editor For Leanote Web & Desktop App
Leanote's Markdown Editor originally forked from Stackedit-v3.1.14. The Stackedit source is under Apache License (http://www.apache.org/licenses/LICENSE-2.0) and the code updated by Leanote is under GPL v2.
Difference with Leanote-Markdown-Editor
Branches
Build
Please install
node
andgulp
firstly.Local Debug
See: http://localhost:3001/editor.html
Integrated With Leanote
Copy
res-min/main-v2.min.js
to leanote's path/public/dist/
.Update node-dev.html with:
Source Debug With Leanote
Replace node-dev.html with:
与 Leanote-Markdown-Editor 的不同
构建
确保在此之前安装了node, gulp
本地调试
访问: http://localhost:3001/editor.html
Leanote 使用本 Markdown v2 编辑器
将
res-min/main-v2.min.js
复制到leanote的/public/dist/
下node-dev.html:
Leanote 调试 Markdown 编辑器的源码
替换node-dev.html