diff --git a/frontend/editor-poc.html b/frontend/editor-poc.html
index d22d70e..3aa3783 100644
--- a/frontend/editor-poc.html
+++ b/frontend/editor-poc.html
@@ -1834,8 +1834,8 @@ body { font-family: var(--sans); background: var(--bg); color: var(--text); heig
} else {
// Continue checkbox
e.preventDefault();
- ta.value = before + '\n' + indent + taskMatch[2] + ' [ ] ';
- ta.setSelectionRange(ta.value.length, ta.value.length);
+ ta.value = before + '\n' + indent + taskMatch[2] + ' [ ] ' + after;
+ ta.setSelectionRange(before.length + taskMatch[2].length + 6, before.length + taskMatch[2].length + 6);
}
markDirty(); autoHeight(); updateLineNumbers();
return;
@@ -1844,7 +1844,7 @@ body { font-family: var(--sans); background: var(--bg); color: var(--text); heig
// Auto-increment ordered list
e.preventDefault();
var num = parseInt(olMatch[2]) + 1;
- ta.value = before + '\n' + olMatch[1] + num + '. ';
+ ta.value = before + '\n' + olMatch[1] + num + '. ' + after;
ta.setSelectionRange(ta.value.length, ta.value.length);
markDirty(); autoHeight(); updateLineNumbers();
return;
@@ -1859,7 +1859,7 @@ body { font-family: var(--sans); background: var(--bg); color: var(--text); heig
} else {
// Continue bullet
e.preventDefault();
- ta.value = before + '\n' + ulMatch[1] + ulMatch[2] + ' ';
+ ta.value = before + '\n' + ulMatch[1] + ulMatch[2] + ' ' + after;
ta.setSelectionRange(ta.value.length, ta.value.length);
}
markDirty(); autoHeight(); updateLineNumbers();