fix(mermaid): toggle read-only for protected note

This commit is contained in:
Elian Doran 2025-03-22 14:12:24 +02:00
parent b777e916c4
commit 72c024fc26
No known key found for this signature in database

View File

@ -41,6 +41,7 @@ export default class ToggleReadOnlyButton extends OnClickButtonWidget {
isEnabled() {
return super.isEnabled()
&& this.note?.type === "mermaid"
&& this.note?.isContentAvailable()
&& this.noteContext?.viewScope?.viewMode === "default";
}