Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/curvy-words-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'cherry-markdown': patch
---

fix: #1593 首次粘贴html内容时,cherry会默认把html转成Markdown,但提示的却是TEXT
7 changes: 4 additions & 3 deletions packages/cherry-markdown/src/utils/pasteHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,10 @@ const pasteHelper = {
},
switchTextClick(event) {
this.setTypeToLocalStorage('text');
if (this.bubbleDom.getAttribute('data-type') === 'text') {
return;
}
// 由于默认是粘贴md,当记忆text的时候,会先转md再转text,所以这里的判断会有问题,不想再套娃解决了,直接注释掉
// if (this.bubbleDom.getAttribute('data-type') === 'text') {
// return;
// }
this.noHide = true;
this.bubbleDom.setAttribute('data-type', 'text');
this.codemirror.doc.replaceSelection(this.html);
Expand Down
Loading