- ASAP TEST: attributes: finalize base mechanics...
- attributes: need to show/hide the attributes -- option?
attr::value
- DONE `.__parse_code__(..)`: add data attributes to code if missing...
- DONE do we need `.__code_attrs__` / `.__view_attrs__`??? -- YES
- DONE delete attr from code -- by setting it to `"null"` or `"undefined"`...
- delete attr from code -- by removing it from attr list (when shown)...
- DONE BUG? can't set `''` as attr value -- parser??
- TOC: tweaking: add args like depth, ... -- as attributes...
- TOC: persistently generate as code
- ```
TOC
```
should turn into:
```
TOC
\- [moo](#moo)
\- [foo](#foo)
```
shown as:
---
\- [moo](#moo)
\- [foo](#foo)
---
- ASAP check if we can add blocks during element handling...
- the main problem here is where to get the data for the index?
possible sources:
- JSON -- preferred
- DOM -- current
- text
- DOM/JSON would require a post-load generation stage...
- simple use strategies:
- custom element
- constructor
- FEATURE: images as blocks...
- export auto-headings as normal/manual markdown headings...
- add plugin callback on `.text(..)` / ...
- Time to think about a standalone client -- at least to edit own notes as a test...
- _also this would be a nice opportunity to start the move to a newer electron version_
- Might be a good idea to think how to avoid the constant selections on focus...
- Focus of elements needs cleanup...
- navigation up/down to a root element is a bit jumpy...
- add loading spinner -- `.loading` class set on `.load(..)` and unset when done...
- DONE set/unset class
- add animation
- make this extensible from client...
- Q: When moving up/down between nodes do we want to place the caret relative to markdown (current) or to view? (see: `CARET_V_MOVE`)
- Q: Should tables be text-based markdown or higher-level?
collapsed:: true
- for reference a normal table
- | col 1 | col 2 | col 3 |
| moo | foo | boo |
| 1 | 2 | 3 |
- block-based -- adjacent blocks in table format (a-la markdown) are treated as rows of one table...
- here is an example
- | col 1 | col 2 | col 3 |
- | A | B | B |
- | 1 | 2 | 3 |
-
- need to align columns -- not sure how (CSS preffered)
- _in terms of syntax I like this the most..._
- _...but it can lead to implementing own table align algorithm (not sure I want to go this way!)..._
- block-children -- similar to how lists are done now
- a demo
- --table--
- | A | B | C |
- | 1 | 2 | 3 |
- | moo | foo | boo |
-
- the header may be used as::
- header row
- caption text
- both?
- Q: how do we handle indenting a table row?
- Q: how do we handle unmarked text?
- edit mode needs work...
- this feels a bit over-restricted...
-
- might be fun to make the general syntax (after removing "-") to be compatible with markdown...
- might also be fun to auto-generate (template) new blocks within a table...
- this would greatly simplify table navigation and creation
- might be a good idea to fill the new elem with a row template...
- creating a new line after this (line 2 as an example)
- | A | B | C |
- | | | |
-
- custom element / web component
- BUG: select via double/triple clicks does not work...
- _looks like something is refocusing the element..._
- BUG/race: the non-value versions of custom elem seem to sometimes get loaded as empty...
- DONE data interface:
collapsed:: true
- the "natural" way to pass data is to use the same mechanism as `<textarea>` the problem is that we can't extend `HTMLTextAreaElement` as it can not have shadow dom (reject?)
- adding an explicit textarea element is an odd requirement (reject?)
- seems that the least bad way to go is to use the `value` attribute
- DONE API: directly mixin Outline?
- DONE `.value` / `.code` should be both updated internally and also load new content when updated externally -- not yet sure how...
- events
- test nesting...
- Q: can we get rid of the editor block??:
- CSS breaks if we do...
- need to figure out a way to handle autofocus for host/editor uniformly
-
- node selection
- DONE multiple node selection (via shift+motion)
- fixed state -- while `shift` pressed select or deselect only depending on first action (a-la FAR)
- DONE double/triple click working...
- delete
- copy/cut/past (???)
- touch/mouse (???)
- Q: should we select text through multiple nodes??
- _...should this turn into node selection as soon as node boundary is crossed???_
- copy/paste nodes/trees
- numbered lists: add counters to a depth of 6-7...
- _or find a way to make them repeat..._
- FEATURE: read-only mode
- FEATURE: TOC (???)
- FEATURE: auto-shift done blocks to the end of siblings... (option?)
- ...or should this be `sort:: done` -- i.e. sort children by done status??
- codeblock as a block
_...if only whitespace before/after clear it and style whole block..._
_...might be a good idea to do this with codeblock at start/end of block..._
- Code blocks and bullets:
- ```
code
```
- _bullet should be either in the middle of the block or at the first line of code (preferred)..._
- export html
- embed css
- cleanup html
- generate ideomatic html (???)
- style attrs (see: [attrs](#attributes))
- FF: figure out a way to draw expand/collapse bullets without the use of CSS' `:has(..)`
- _...this is more complicated than adding `behavior: "smooth"` to `.scrollIntoView(..)` as scrolling animation will get interrupted by next user input..._
- need to cancel animation if things are moving too fast...
- make this generic (???)
- JSON API
- cli
- Q: do we use \\t for indent? (option???)
- Q: persistent empty first/last node (a button to create a new node)?
- Q: search?
- _seems that search should be external to the editor_
- empty item height is a bit off...
- Nerd fonts (option???)
- FEATURE: `collapse-children:: true` block option -- when loading collapse all immediate children
- [_] we can also add inline [x] checkboxes and states: [%]
- navigating checkboxes in view mode can be done via `ctrl-left` / `ctrl-right` and toggling is done via `space`
- links
- [link](about:blank)
- [local links](#attributes)
- https://example.com
- ./path/to/file /path/to -- _not supported yet_
- Tables
- | a | b | c |
| 1 | 2 | 3 |
| 11 | 22 | 33 |
- Symbols -- _should these be ligatures?_
- (i), (c), /!\, ...
- -- and ---
- Table of content
- Global
- TOC
- Local
- toc
- demo content
collapsed:: true
- @ Heading
- @ Heading
- @ Heading
- @ Heading
- @ Heading
- Attributes:
id:: attributes
- collapsed
collapsed:: true
- a
- b
- c
- id
id:: node-with-id
- combined
id:: combined-several-ids
collapsed:: true
- a
- b
- c
-
- ---
- ### Playground for testing
- Empty line tests::
-
leading
- trailing
-
both
- ```
block with trailing empty line
```
- A
collapsed:: true
- a
- b
- c
- B
- d
- e
- C
- This is a line of text
- This is a set
text lines
- Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text Lots of text