Coder Social home page Coder Social logo

vanessa219 / vditor Goto Github PK

View Code? Open in Web Editor NEW
7.9K 7.9K 818.0 25.4 MB

♏ 一款浏览器端的 Markdown 编辑器,支持所见即所得(富文本)、即时渲染(类似 Typora)和分屏预览模式。An In-browser Markdown editor, support WYSIWYG (Rich Text), Instant Rendering (Typora-like) and Split View modes.

Home Page: https://b3log.org/vditor

License: MIT License

TypeScript 65.77% JavaScript 6.77% CSS 23.53% Less 3.93%
commonmark editor gfm lute markdown md react rich-text typescript typora vue wysiwyg

vditor's Introduction

Hey 👋, I'm Vanessa!

Github Stats

我在链滴的近期动态

⭐️ Star 个人主页 后会自动更新,最近更新时间:2024-05-27 08:39:03

📝 帖子   💬 评论   🗣 回帖   🌙 清月   👨‍💻 用户   🏷️ 标签   ⭐️ 关注   👍 赞同   💗 感谢   💰 打赏   🗃 收藏

vditor's People

Contributors

0xchen avatar 790891601 avatar 88250 avatar abieru avatar angleshe avatar beadre avatar bs32g1038 avatar cipchk avatar dase1353 avatar dependabot[bot] avatar heiyehk avatar herberthe avatar holmofy avatar jakekwak avatar jibenziliao avatar jsbry avatar justice2001 avatar kuaizr avatar lanomw avatar lz6060788 avatar moheng233 avatar mrflos avatar myml avatar natescarlet avatar stevapple avatar tangshengzhi avatar ti777777 avatar tobiastao avatar undefined-moe avatar vanessa219 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vditor's Issues

所见即所得模式录音bug

  • 所见即所得模式下录音后切换至普通的编辑模式,整个编辑界面会被遮罩锁死,只能再次通过点击录音/停止录音后解除编辑模式下的录音遮罩
  • audio音频标签控件从编辑模式切换回所见即所得模式后无法正确渲染,直接html文本片段输出了

vditor

add row 添加快捷键

  1. more cell (suggestion: shift+tab)
  2. how to escape (same as other shortcut key shift+ctrl+e)
    table

统一后端接口规范

请求统一

请求方法使用 POST,参数为 body JSON。

  • markdown

     {
         "markdownText": ""
     }
  • at

      {
          "name": ""
      }
  • upload

    FormData
    
  • fetch upload

    {
        "url": ""
    }

返回值统一

{
    "code": 0,
    "msg": "",
    "data": "json type"
}

添加 option.value

当前如果在react中使用父组件传递过来的defaultValue值时无法通过数据流渲染到vditor,只能通过setValue方法处理,该方法只能在compoenntDidUpdate中调用,可能存在堆栈溢出的现象。

Vditor.preview不能渲染

在vue中我有两个组件使用了Vditor,组件A用的是Vditor.preview,代码如下:

mounted() {
       Vditor.preview(document.getElementById('vditorPreview'),this.html, {
           className: 'preview vditor-reset vditor-reset--anchor',
           hljs: {
           lineNumber: true,
                    enable: true
           },
           speech: {
                enable: true,
           },
           anchor: true
     })
}

打开后报错

 Cannot read property 'options' of undefined

另一个组件B用的是编辑模式,代码如下:

mounted() {
      this.vditor = new Vditor('vditorEdit', {
          height: 600,
          tab: '\t',
          preview:{
                delay: 200,
          }
      })
}

现在的问题是打开A会报上面的错误,然后我再打开B是正常的,再回去打开A又不报错了,如果再次刷新,还是报错

添加 CDN 配置

如果使用 CommonJS 模式,CDN 读取依旧为官方的,需要添加配置项

CDN 切换优化

移除打包时对 package.json 的配置,否则在 import 后无法修改 cdn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.