Quill Editor使用公式


const katex = require('katex');
const win: any = window;
win.katex = katex;

首先,引入katex

 @import '~katex/dist/katex.css';

然后,引入katex.css

editorConfig = {
    placeholder: '文档详情',
    modules: {
      formula: true,
      toolbar: {
        container: [
          [{ header: [1, 2, 3, false] }],
          ['bold', 'italic', 'underline'],
          [{ 'list': 'ordered' }, { 'list': 'bullet' }],
          [{ 'color': [] }, { 'background': [] }],
          [{ 'font': [] }, { 'align': [] }],
          ['blockquote', 'code-block', 'formula', 'image', 'video'],
          ['activity']
        ]
      }
    }
  };

最后,配置editor

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM