mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-07 21:39:48 -06:00
fix(mermaid): read-only button shown in view source
This commit is contained in:
@@ -39,7 +39,9 @@ export default class ToggleReadOnlyButton extends OnClickButtonWidget {
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return super.isEnabled() && this.note?.type === "mermaid";
|
||||
return super.isEnabled()
|
||||
&& this.note?.type === "mermaid"
|
||||
&& this.noteContext?.viewScope?.viewMode === "default";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user