diff --git a/packages/bbui/src/Markdown/MarkdownEditor.svelte b/packages/bbui/src/Markdown/MarkdownEditor.svelte index 6c711c9d28..888187c8da 100644 --- a/packages/bbui/src/Markdown/MarkdownEditor.svelte +++ b/packages/bbui/src/Markdown/MarkdownEditor.svelte @@ -20,7 +20,9 @@ // control $: checkValue(value) $: mde?.codemirror.on("change", debouncedUpdate) - $: mde?.codemirror.setOption("readOnly", readonly) + $: if (readonly || disabled) { + mde?.togglePreview() + } const checkValue = val => { if (mde && val !== latestValue) {