cherry-markdown icon indicating copy to clipboard operation
cherry-markdown copied to clipboard

[Bug Report] 当switchModel 为 previewOnly时, "enablePreviewerBubble" 的状态不对

Open jackrebel opened this issue 11 months ago • 1 comments

Prerequisites

Version

v0.8.58

Reproduction Link

No response

Describe the Bug

 if (result.isRead) {
        window.cherry.switchModel('previewOnly');
      }

当设置为previewOnly时, 如何同时设置"enablePreviewerBubble"为false? 它应该是只读不能再被编辑才对.

  previewer: {
    dom: false,
    //className: 'cherry-markdown', 
    enablePreviewerBubble: true,
    floatWhenClosePreviewer: true
  },

System Information


Contributing

None

jackrebel avatar Jan 20 '25 16:01 jackrebel

可以用cherry.previewer.options.enablePreviewerBubble = false来关掉预览区域的所见即所得编辑能力哈。

至于为什么设置成“纯预览模式”还是可以编辑预览区内容,大概就是设计如此,具体可以见这个issue里的讨论哈:https://github.com/Tencent/cherry-markdown/issues/765

sunsonliu avatar Jan 21 '25 02:01 sunsonliu