Open
Conversation
|
感谢,我这边也用上了。同样有相关错误。 |
|
该错误是因为 MathJax 的初始化时机不对。 相关代码请参考附件 mpmath-0.2.1-fixed.zip |
|
还有个公式字体大小无法改变的问题,应该是编辑器 DOM 结构改变引起的。 |
|
我这边用得还OK。用的是 Chrome。 |
|
您用的chrome版本式多少?
|
ZBCccc
added a commit
to ZBCccc/mpmath
that referenced
this pull request
Mar 27, 2026
- manifest.json: 修正 background.service_worker → service_worker (Manifest V3 语法) - mpm-inject.js: 插入公式 API 从 execCommand 改为 __MP_Editor_JSAPI__.invoke (解决微信 2024+ 编辑器 API 变更) - popup.html: 移除 MathJax async 属性解决初始化时序问题 - popup.js: 添加 MathJax 加载 guard,移除硬编码 max-width:300% - content-script.js: revise() 添加 SVG 重复转换跳过和错误处理 - mpMath.css: 添加公式容器 font-size 继承规则 - README.md: 更新安装说明 (CRX → 解压加载已解压扩展程序) 解决 Issue: latentcat/mpmath latentcat#12, latentcat#11, latentcat#7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



修改说明
我按照 Issue #11 中 @Jw-23 的建议修改了
mpm.inject.js文件中的第27行代码。修改之后,我在 Microsoft Edge 上可以正常插入新公式了。另外,我还修改了
manifest.json文件中的一个参数名称background.service_worker。按照 MDN Web Docs: Browser extensions 中的说明,background的参数名称是service_worker。现有问题
每次重新加载公众号文章编辑页面时,公式插件总是会产生下图中的错误。但这个错误好像不影响插件的使用。