Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(markdown): add read-only toggle button
Elian Dorand22b0079dcf1
diff --git a/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx b/apps/client/src/widgets/ribbon/NoteActionsCustom.tsxindex 92587d2ca9..c868014557 100644--- a/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx+++ b/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx@@ -203,7 +203,7 @@ function SwitchSplitOrientationButton({ note, isReadOnly, isDefaultViewMode }: Nexport function ToggleReadOnlyButton({ note, isDefaultViewMode }: NoteActionsCustomInnerProps) {const [ isReadOnly, setReadOnly ] = useNoteLabelBoolean(note, "readOnly");const isSavedSqlite = note.isTriliumSqlite() && !note.isHiddenCompletely();- const isEnabled = ([ "mermaid", "mindMap", "canvas", "spreadsheet" ].includes(note.type) || isSavedSqlite)+ const isEnabled = ([ "mermaid", "mindMap", "canvas", "spreadsheet" ].includes(note.type) || isSavedSqlite || note.isMarkdown())&& note.isContentAvailable() && isDefaultViewMode;return isEnabled && <NoteAction