fix(workspace): ignore formatting shortcuts in read-only notes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sandrodachandClaude Opus 5.5 committed 2026-10-30 16:51:14 +01:00
1 parent 8ecde4872d
commit 5ff99c5434
1 file changed
+1 -1
@@ -645,7 +645,7 @@ export const OutlinerBlock: React.FC<OutlinerBlockProps> = ({
// Formatting shortcuts (Ctrl/Cmd+B, Ctrl/Cmd+I, Ctrl/Cmd+K) - not in code blocks
const isMod = (e.ctrlKey || e.metaKey) && !e.altKey;
if (isMod && block.type !== 'code' && ['b', 'i', 'k'].includes(e.key.toLowerCase())) {
if (isMod && canEdit && block.type !== 'code' && ['b', 'i', 'k'].includes(e.key.toLowerCase())) {
e.preventDefault();
e.stopPropagation();