Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 自动转换 markdown 文本 #95

Merged
merged 2 commits into from
May 19, 2020
Merged

feat: 自动转换 markdown 文本 #95

merged 2 commits into from
May 19, 2020

Conversation

colmugx
Copy link
Member

@colmugx colmugx commented May 18, 2020

Why

no why
业务上看,大多数用户都当作 markdown 编辑器用,避免造成落差感

How

  1. 监听粘贴,获取纯文本
  2. 猜测是否是 markdown:[-*1#]{1,6}\s+|!?\[\S*\][\s*|(\S*)].*?[-*1#]?
  3. 直接用 marked处理,或放行交给下层优先级处理

Test

pic

@auto-add-label auto-add-label bot added the enhancement New feature or request label May 18, 2020
@netlify
Copy link

netlify bot commented May 18, 2020

Deploy preview for v-editor ready!

Built with commit 5876800

https://deploy-preview-95--v-editor.netlify.app

@colmugx colmugx merged commit 00fc1ce into FEMessage:dev May 19, 2020
@colmugx colmugx deleted the feat/markdown branch May 19, 2020 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants