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

fix: 修复 readonly 模式下,特定内容下editor初始化报错的问题 #4139

Merged
merged 1 commit into from
May 6, 2022

Conversation

TGuoW
Copy link
Contributor

@TGuoW TGuoW commented May 4, 2022

No description provided.

@TGuoW
Copy link
Contributor Author

TGuoW commented May 4, 2022

相关issue: wangeditor-team/wangEditor-v5#449

原因是,即使在readonly下,slate中依然需要调用apply方法把html normalize 成响应的model数据,而readonly下直接return了,导致model数据不正常。

原来的代码下,之所以需要return,是因为不希望readonly下能够insertText,因此单独处理insertText即可

@wangfupeng1988 wangfupeng1988 merged commit 226e836 into master May 6, 2022
@wangfupeng1988 wangfupeng1988 deleted the fix-readonly branch May 6, 2022 13:30
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

Successfully merging this pull request may close these issues.

2 participants