Fix image live preview
This commit is contained in:
parent
24c17a793f
commit
1edfb7cc67
@ -26,6 +26,14 @@ function hideNodes(view: EditorView) {
|
||||
}).range(node.from),
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
node.name === "Image" &&
|
||||
!isCursorInRange(view.state, [node.from, node.to])
|
||||
) {
|
||||
widgets.push(invisibleDecoration.range(node.from, node.to));
|
||||
}
|
||||
|
||||
if (
|
||||
node.name === "FrontMatterMarker"
|
||||
) {
|
||||
|
@ -48,12 +48,6 @@ const inlineImages = (view: EditorView) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
!isCursorInRange(view.state, [node.from, node.to])
|
||||
) {
|
||||
widgets.push(invisibleDecoration.range(node.from, node.to));
|
||||
}
|
||||
|
||||
const imageRexexResult = imageRegex.exec(
|
||||
view.state.sliceDoc(node.from, node.to),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user