• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

leanote/markdown-editor-v2: Markdown Editor V2 (Support Vim & Emacs Mode) Fo ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

leanote/markdown-editor-v2

开源软件地址(OpenSource Url):

https://github.com/leanote/markdown-editor-v2

开源编程语言(OpenSource Language):

JavaScript 94.5%

开源软件介绍(OpenSource Introduction):

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

  • Use Ace Editor as main editor
  • Support Vim & Emacs mode

Branches

Build

Please install node and gulp firstly.

> 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)

Local Debug

> node server.js

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:

<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>

Source Debug With Leanote

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>

Leanote-Markdown-Editor 的不同

  • 使用Ace编辑器作为主要的编辑器
  • 支持Vim和Emacs编辑模式

构建

确保在此之前安装了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)

本地调试

> node server.js

访问: http://localhost:3001/editor.html

Leanote 使用本 Markdown v2 编辑器

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>

Leanote 调试 Markdown 编辑器的源码

替换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>



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap