markdown-plus
markdown-plus copied to clipboard
希望windows版可以支持粘贴图片
RT,markdown编辑器windows下面这个很少有做得好的,希望mdp可以做好
这个功能我也考虑过很久了。 问题是mdp不是云存储。 粘贴图片总归要放到本地去存储。还没有想出一个合理的方案来。目前想到最可行的是: 用户粘贴图片,自动保存到app下面的一个子目录,然后引用到app里面。
可以base64编码存入文档
@ijse 说的没错。唯一的顾虑就是 base64 会明显比原始文件大,导出HTML可能不是那么好看。
推荐参考下Trumbowyg, 它很多功能都以插件形式引入
Markdown Plus 也支持插件机制: https://github.com/tylingsoft/markdown-plus-plugins
但是这个 issue 并非插件能轻易解决的。 因为现在不知道图片应该存放在哪。
存图床上,或者base64嵌入什么的。。。
@tylerlong
我想最理想是本地 APP 目录和第三方存储结合。 现在如 阿里云、七牛、Dropbox 都有 HTTP 接口,javascript 可以很容易调用。
我在想: 抽象出一套图片存储后端接口,图片的存储、加载、HTML 发布的 URL 都由这套接口的实现者提供。 用户使用的时候可以配置图片存储后端。
有了统一的接口,喜欢这个编辑器的开发人员也可以为第三方存储贡献图片存储插件。
粗看了一下,没有找到 markdown-plus 的插件 API 文档,不知道目前有没有?
这里的只是前端的代码, app的代码并未开源。
我写的插件在这里: https://github.com/tylingsoft/markdown-plus-plugins 比较简单粗暴,就是直接注入 JS。
目前没有相关文档。 可以阅读代码,代码量并不大。
请问怎么把代码弄成index.bundle.js
yarn watch时报这个错: ` D:\ws_now\markdown-plus>yarn watch yarn run v1.9.4 $ yarn build -- --watch warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts. $ node -r babel-register node_modules/.bin/webpack --progress --colors --watch D:\ws_now\markdown-plus\node_modules.bin\webpack:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") ^^^^^^^
SyntaxError: missing ) after argument list at new Script (vm.js:73:7) at createScript (vm.js:245:10) at Object.runInThisContext (vm.js:297:10) at Module._compile (internal/modules/cjs/loader.js:657:28) at Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Object.require.extensions.(anonymous function) [as .js] (D:\ws_now\markdown-plus\node_modules\babel-register\lib\node.js:152:7) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
D:\ws_now\markdown-plus>yarn run test -o --watch yarn run v1.9.4 error Command "test" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. `