Fixes #1030
parent
9b88a8d694
commit
94d745c7a7
|
@ -229,7 +229,6 @@ export class ClientSystem extends CommonSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
getObjectByRef<T>(page: string, tag: string, ref: string) {
|
getObjectByRef<T>(page: string, tag: string, ref: string) {
|
||||||
console.log("Calling getObjectByRef", page, tag, ref);
|
|
||||||
return this.localSyscall(
|
return this.localSyscall(
|
||||||
"system.invokeFunction",
|
"system.invokeFunction",
|
||||||
["index.getObjectByRef", page, tag, ref],
|
["index.getObjectByRef", page, tag, ref],
|
||||||
|
|
|
@ -158,6 +158,7 @@ export function inlineContentPlugin(client: Client) {
|
||||||
return decoratorStateField((state: EditorState) => {
|
return decoratorStateField((state: EditorState) => {
|
||||||
const widgets: Range<Decoration>[] = [];
|
const widgets: Range<Decoration>[] = [];
|
||||||
if (!shouldRenderWidgets(client)) {
|
if (!shouldRenderWidgets(client)) {
|
||||||
|
console.info("Not rendering widgets");
|
||||||
return Decoration.set([]);
|
return Decoration.set([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,8 +226,13 @@ export function inlineContentPlugin(client: Client) {
|
||||||
"sb-markdown-widget sb-markdown-widget-inline",
|
"sb-markdown-widget sb-markdown-widget-inline",
|
||||||
),
|
),
|
||||||
block: true,
|
block: true,
|
||||||
}).range(node.to + 1),
|
}).range(node.to),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!isCursorInRange(state, [node.from, node.to])) {
|
||||||
|
widgets.push(invisibleDecoration.range(node.from, node.to));
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue