lyscmsPro
关注
64746 号成员,2021-01-20 23:39:40 加入
239
个人主页 浏览
12h16m
在线时长
  • vditor 编辑器保存内容为 md 格式后,怎么在前端页面显示

    2021-01-31 22:25

    md2html 代码没有渲染高亮呢? 配置如下:

    Vditor.md2html(markdown,
          {
            mode: 'light',
            hljs: {
              enable: true,
              style: 'native',
              lineNumber: true,
            },
            markdown:{
              codeBlockPreview: true,
            },
            speech: {
              enable: true,
            },
            anchor: 1,
          },
        ).then((value: string) => {
          setHtml(value);
        });