We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cherryObj.setMarkdown('') console.log(cherryObj.getToc()); 当我这样去获取目录时,获取到的不是''计算出的目录,而是上一个value所计算出来的,我只能在getToc加上setTimeout来hack这个问题,希望可以修正这个问题或者抛给我一个额外的api可以让我自己从一段字符串中计算出正确的目录
No response
None
The text was updated successfully, but these errors were encountered:
setMarkdown确实是异步的,这是codemirror的机制导致的。可以考虑用afterChange这个回调函数配置哈。
setMarkdown
afterChange
另外如果单纯的想实现悬浮目录的话,可以考虑用cherry自带的toc悬浮目录哈,配置如下:
效果可以在 https://tencent.github.io/cherry-markdown/examples/index.html 这里体验
Sorry, something went wrong.
好的感谢
No branches or pull requests
Prerequisites
Clear and concise description of the problem
cherryObj.setMarkdown('')
console.log(cherryObj.getToc());
当我这样去获取目录时,获取到的不是''计算出的目录,而是上一个value所计算出来的,我只能在getToc加上setTimeout来hack这个问题,希望可以修正这个问题或者抛给我一个额外的api可以让我自己从一段字符串中计算出正确的目录
Suggested solution
No response
Further Information
No response
Contributing
None
The text was updated successfully, but these errors were encountered: