Code Monkey home page Code Monkey logo

Comments (4)

imzbf avatar imzbf commented on September 22, 2024
import { config } from 'md-editor-v3';

config({
  markdownItConfig(md) {
    md.set({
      html: false,
    });
  },
});

这样就能满足你的要求

from md-editor-v3.

Seven-7i avatar Seven-7i commented on September 22, 2024

这样子做的话,全局就写死了吧,不能通过按钮去动态控制这个

from md-editor-v3.

imzbf avatar imzbf commented on September 22, 2024

也是可以的,你的按钮事件触发时,执行一次config,然后控制你的组件重新渲染即可。markdownItConfig的第二参数携带了编辑器的ID,你也可以单独针对某个编辑器进行控制。

组件没有办法内置这个功能,能做到这个行为的只能这样配置,而用户的配置永远是高于内部组件默认的配置的

from md-editor-v3.

Seven-7i avatar Seven-7i commented on September 22, 2024

明白了 非常感谢您的答疑解惑!

from md-editor-v3.

Related Issues (20)

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.