added checkboxes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-10-08 02:57:21 +03:00
parent 6633bc065a
commit fa5888dffb
2 changed files with 10 additions and 1 deletions

View File

@ -338,6 +338,8 @@ var Outline = {
elem.collapsed = value.trim() == 'true' elem.collapsed = value.trim() == 'true'
return '' }) return '' })
// markdown... // markdown...
.replace(/^TODO\s*(.*)$/, '<input type="checkbox"> $1')
.replace(/^DONE\s*(.*)$/, '<input type="checkbox" checked> $1')
.replace(/^######\s*(.*)$/, style('heading-6')) .replace(/^######\s*(.*)$/, style('heading-6'))
.replace(/^#####\s*(.*)$/, style('heading-5')) .replace(/^#####\s*(.*)$/, style('heading-5'))
.replace(/^####\s*(.*)$/, style('heading-4')) .replace(/^####\s*(.*)$/, style('heading-4'))

View File

@ -28,7 +28,9 @@ var setup = function(){
<div class="code"> <div class="code">
- # Outline editor prototype - # Outline editor prototype
- ## TODO - ## TODO
- BUG: delete in edit mode deletes node... - BUG: delete in edit mode deletes node
- BUG: multiline blocks do not indent correctly in editor
- make checkboxes clickable
- editor: enter on an expanded parent node should create child (currently next sibling) - editor: enter on an expanded parent node should create child (currently next sibling)
- editor: bksapce/del at start/end of a block should join it with prev/next - editor: bksapce/del at start/end of a block should join it with prev/next
- editor: pressing enter in text edit mode should split text into two blocks - editor: pressing enter in text edit mode should split text into two blocks
@ -69,7 +71,12 @@ var setup = function(){
- a - a
- b - b
- c - c
- line
- ---
- basic inline *bold*, _italic_ and ~striked~ - basic inline *bold*, _italic_ and ~striked~
- To do items
- TODO undone item
- DONE done item
- A - A
collapsed:: true collapsed:: true
- a - a