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

在change事件中使用setMarkdown或者setValue时,预览区不同步更新 #1012

Open
austzyl opened this issue Sep 19, 2024 · 0 comments

Comments

@austzyl
Copy link

austzyl commented Sep 19, 2024

editor.on('change', function() {
const md = editor.getMarkdown();
if(md.length > 10) {
editor.setMarkdown(md.substring(0, 10))
}
})
类似上述代码,Markdown内容变更后,输入1234578901,左侧Markdown内容变味1234567890,而右侧preview区还是1234578901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant