We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5b3716 commit 4a93428Copy full SHA for 4a93428
.changeset/forty-cloths-serve.md
@@ -0,0 +1,5 @@
1
+---
2
+'cherry-markdown': patch
3
4
+
5
+fix: #1497 修复editOnly模式初始化后,getHtml获取不到数据的问题
packages/cherry-markdown/src/Previewer.js
@@ -799,7 +799,8 @@ export default class Previewer {
799
}
800
801
editOnly() {
802
- this.doHtmlCache(this.getDomContainer().innerHTML);
+ const html = this.options.previewerCache.html ? this.options.previewerCache.html : this.getDomContainer().innerHTML;
803
+ this.doHtmlCache(html);
804
this.$dealEditAndPreviewOnly(true);
805
this.$cherry.$event.emit('previewerClose');
806
this.$cherry.$event.emit('editorOpen');
0 commit comments