|
|
|
@ -188,7 +188,7 @@ export default class FindWidget extends NoteContextAwareWidget {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!["text", "code", "render"].includes(this.note?.type ?? "")) {
|
|
|
|
if (!["text", "code", "render", "mindMap"].includes(this.note?.type ?? "")) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -250,6 +250,8 @@ export default class FindWidget extends NoteContextAwareWidget {
|
|
|
|
case "text":
|
|
|
|
case "text":
|
|
|
|
const readOnly = await this.noteContext?.isReadOnly();
|
|
|
|
const readOnly = await this.noteContext?.isReadOnly();
|
|
|
|
return readOnly ? this.htmlHandler : this.textHandler;
|
|
|
|
return readOnly ? this.htmlHandler : this.textHandler;
|
|
|
|
|
|
|
|
case "mindMap":
|
|
|
|
|
|
|
|
return this.htmlHandler;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
console.warn("FindWidget: Unsupported note type for find widget", this.note?.type);
|
|
|
|
console.warn("FindWidget: Unsupported note type for find widget", this.note?.type);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -352,7 +354,7 @@ export default class FindWidget extends NoteContextAwareWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
isEnabled() {
|
|
|
|
isEnabled() {
|
|
|
|
return super.isEnabled() && ["text", "code", "render"].includes(this.note?.type ?? "");
|
|
|
|
return super.isEnabled() && ["text", "code", "render", "mindMap"].includes(this.note?.type ?? "");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
|
|
|
|
async entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) {
|
|
|
|
|