Dev #8

Merged
sandrodach merged 30 commits from dev into main 2026-10-27 22:02:54 +01:00
Showing only changes of commit fd89f92b0c - Show all commits
@@ -344,11 +344,19 @@ export const OutlinerBlock: React.FC<OutlinerBlockProps> = ({
return;
}
// 2. Enter (without Shift) -> Create new block on same level
// 2. Enter (without Shift) -> If block is completely empty and level > minLevel, outdent (Shift+Tab behaviour), otherwise create new block below
if (e.key === 'Enter' && !e.shiftKey && block.type !== 'code') {
e.preventDefault();
e.stopPropagation();
setSlashSearch(null);
const minLevel = levelOffset || 0;
if (localContent === '' && Math.max(0, block.level || 0) > minLevel) {
flushDebounce(localContent);
onIndentBlockRef.current(block.id, -1);
return;
}
flushDebounce(localContent);
onCreateBlockBelowRef.current(block.id, localContent);
return;