Skip to content

feat: KaTeX compatibility #6

@xinkeng0

Description

@xinkeng0

目前插件正常情况下可以工作,但是需要做一些兼容性方面的改进 。

KaTeX Auto-render Extension

目前公式渲染的方式为:

renderMathInElement(document.body, {
          // customised options
          // • auto-render specific keys, e.g.:
          delimiters: [
              {left: '$$', right: '$$', display: true},
              {left: '$', right: '$', display: false},
              {left: '\(', right: '\)', display: false},
              {left: '\[', right: '\]', display: true}
          ],
          // 鈥� rendering keys, e.g.:
          throwOnError : false
        });

可能的改进点:

  1. document.body 需要更换为特定的Dom标记,例如 <Math></Math>
    必须修改此项,来最大限度解决错误处理等类似问题。
  1. 相应的更新richer-editor公式生成的Dom结构以支持改动。

Metadata

Metadata

Assignees

Labels

kind/improvementCategorizes issue or PR as related to a improvement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions