Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathJax 支持传入其他配置项 #1453

Closed
Esword618 opened this issue Aug 11, 2023 · 4 comments
Closed

MathJax 支持传入其他配置项 #1453

Esword618 opened this issue Aug 11, 2023 · 4 comments
Assignees
Milestone

Comments

@Esword618
Copy link

下面是我对于math的MathJax渲染设置,这里我设置禁止右键上下文菜单enableMenu: false,但是不生效,应该是MathJax版本太低的原因。

Vditor.mathRender(previewElement, {
    math: {
      inlineDigit: true,
      engine: "MathJax",
      macros:{
        options: {
          // 隐藏右键菜单
          enableMenu: false, 
        },
        startup: {
          typeset: true,
        },
        // 配置解析式定位符
        tex: {
          inlineMath: [['$', '$'], ['\\(', '\\)']],
          displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
          equationNumbers: { autoNumber: 'AMS' },
        },
        svg: {
          fontCache: 'global'
        },
      }
    }
  })
@Vanessa219
Copy link
Owner

是要禁用公式上右键弹出的下图内容么?
image

@Esword618
Copy link
Author

不是,是这个
image

@Vanessa219
Copy link
Owner

宏对应传入的是 tex 下的,其他参数目前不支持

  tex: {
                    macros: options.math.macros,
   },


Vditor.mathRender(previewElement, {
                math: {
                    inlineDigit: true,
                    engine: "MathJax",
                    macros: {
                            inlineMath: [['$', '$'], ['\\(', '\\)']],
                            displayMath: [['$$', '$$'], ["\\[", "\\]"]],
                            equationNumbers: {autoNumber: 'AMS'},
                    }
                }
            })

@Esword618
Copy link
Author

好的

@Vanessa219 Vanessa219 changed the title math渲染引擎MathJax禁止上下文菜单不生效bug MathJax 支持传入其他配置项 Aug 25, 2023
@Vanessa219 Vanessa219 self-assigned this Aug 25, 2023
@Vanessa219 Vanessa219 added this to the 3.9 milestone Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants