Wechat applet markdown rendering component wemark

Time:2019-12-14

Webmark can render markdown content in an applet. It supports most markdown features such as pictures and tables.

Characteristic

  • It is provided in the form of applet custom components and can be directly introduced for use
  • Support the analysis and rendering of most markdown Tags
  • Support code table, code highlighting, HTML video and other features
  • Support for rendering with native rich text
  • Compatible with mpvue and other development frameworks

Use

1. Download and copy the Webmark directory to the applet root directory

2. Reference the Webmark component in the configuration file of the page

{
    "usingComponents": {
        "wemark": "../wemark/wemark"
    }
}

3. Used in wxml:

<wemark md="{{md}}" link highlight type="wemark"></wemark>

Parameter Description:

  • MD, required, the markdown string to be rendered;
  • Link, whether to parse the link. If it is parsed, it will be displayed using the applet navigator component. You can jump within the applet. The default value is false;
  • Highlight: whether to highlight the code. The default value is false;
  • Type, rendering mode. Webmark will use the data structure and template of Webmark for rendering, and rich text will use the rich text component built in the applet for rendering (link jump and video are not supported).

Operation effect

Wechat applet markdown rendering component wemark
Wechat applet markdown rendering component wemark
Wechat applet markdown rendering component wemark

Other

Webmark project address: https://github.com/toobug/webmark

Encyclopedia knowledge dictionary

Wechat applet markdown rendering component wemark

Recommended Today

Interviewer: young man, what do you think of the principle of distributed system

1 Concept 1.1 model 1.2 copies 1.3 indicators for measuring distributed systems 2. Principle of distributed system 2.1 data distribution 2.2 basic copy agreement 2.3 lease mechanism 2.4 quorum mechanism 2.5 log technology 2.6 two phase submission protocol 2.7 MVCC 2.8 Paxos protocol 2.9 CAP 1 Concept 1.1 model node In a specific project, a […]