Comments (9)
这个功能我也考虑过很久了。 问题是mdp不是云存储。 粘贴图片总归要放到本地去存储。还没有想出一个合理的方案来。目前想到最可行的是: 用户粘贴图片,自动保存到app下面的一个子目录,然后引用到app里面。
from markdown-plus.
可以base64编码存入文档
from markdown-plus.
@ijse 说的没错。唯一的顾虑就是 base64 会明显比原始文件大,导出HTML可能不是那么好看。
from markdown-plus.
推荐参考下Trumbowyg, 它很多功能都以插件形式引入
from markdown-plus.
Markdown Plus 也支持插件机制: https://github.com/tylingsoft/markdown-plus-plugins
但是这个 issue 并非插件能轻易解决的。 因为现在不知道图片应该存放在哪。
from markdown-plus.
存图床上,或者base64嵌入什么的。。。
from markdown-plus.
我想最理想是本地 APP 目录和第三方存储结合。
现在如 阿里云、七牛、Dropbox 都有 HTTP 接口,javascript 可以很容易调用。
我在想:
抽象出一套图片存储后端接口,图片的存储、加载、HTML 发布的 URL 都由这套接口的实现者提供。
用户使用的时候可以配置图片存储后端。
有了统一的接口,喜欢这个编辑器的开发人员也可以为第三方存储贡献图片存储插件。
粗看了一下,没有找到 markdown-plus 的插件 API 文档,不知道目前有没有?
from markdown-plus.
这里的只是前端的代码, app的代码并未开源。
我写的插件在这里: https://github.com/tylingsoft/markdown-plus-plugins
比较简单粗暴,就是直接注入 JS。
目前没有相关文档。 可以阅读代码,代码量并不大。
from markdown-plus.
请问怎么把代码弄成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.
`
from markdown-plus.
Related Issues (20)
- 执行安装失败 HOT 1
- Flow chart arrows huge in windows version
- 请问怎么把代码弄成index.bundle.js,yarn watch时报这个错
- MDP Registered Last Versión Failed to Save As
- Include license as a file
- A vulnerablity on the website
- Online real-time collaborative edition?
- windows 10上没法用
- XSS via Markdown
- [[a,b],[c,d]] is not rendered
- Paginated PDF import contains only empty pages HOT 3
- 询问授权问题 HOT 1
- Visual code extension
- IE浏览器不可以使用预览功能吗?
- '\tag{num}' is not work
- Windows MDP 2.3.0: Window Maximized Improperly
- Windows MDP 2.3.0: Missing Exit Menu and Minimize to Systray option
- Commonmark conformance
- Standalone rendering engine
- flowchart arrows missing when export to html
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdown-plus.