Toggle preview
This commit is contained in:
parent
f02f5576f4
commit
a03a00c4af
|
@ -20,7 +20,9 @@
|
||||||
// control
|
// control
|
||||||
$: checkValue(value)
|
$: checkValue(value)
|
||||||
$: mde?.codemirror.on("change", debouncedUpdate)
|
$: mde?.codemirror.on("change", debouncedUpdate)
|
||||||
$: mde?.codemirror.setOption("readOnly", readonly)
|
$: if (readonly || disabled) {
|
||||||
|
mde?.togglePreview()
|
||||||
|
}
|
||||||
|
|
||||||
const checkValue = val => {
|
const checkValue = val => {
|
||||||
if (mde && val !== latestValue) {
|
if (mde && val !== latestValue) {
|
||||||
|
|
Loading…
Reference in New Issue