Compare commits

...

3 Commits

Author SHA1 Message Date
d2d10c68fb notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-11 13:19:44 +03:00
9ff1deb0bc ...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-11 13:16:51 +03:00
8ef755c616 tweaks and notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-11 13:13:27 +03:00
2 changed files with 18 additions and 3 deletions

View File

@ -193,7 +193,7 @@ var Outline = {
&& (data.collapsed ?
node.setAttribute('collapsed', '')
: node.removeAttribute('collapsed'))
if(data.text){
if(data.text != null){
var text = node.querySelector('textarea')
var html = node.querySelector('span')
if(this.__code2html__){
@ -352,10 +352,13 @@ var Outline = {
.replace(/\s*(?<!\\)\[[Xx]\]\s*/gm,
style('check', '<input type="checkbox" checked>'))
// basic styling...
// XXX revise...
.replace(/(?<!\\)\*(?=[^\s*])(([^*]|\\\*)*[^\s*])(?<!\\)\*/gm, '<b>$1</b>')
.replace(/(?<!\\)~(?=[^\s~])(([^~]|\\~)*[^\s~])(?<!\\)~/gm, '<s>$1</s>')
.replace(/(?<!\\)_(?=[^\s_])(([^_]|\\_)*[^\s_])(?<!\\)_/gm, '<i>$1</i>')
.replace(/(?<!\\)`(?=[^\s_])(([^`]|\\`)*[^\s_])(?<!\\)`/gm, '<code>$1</code>')
.replace(/(?<!\\)`(?=[^\s])(([^`]|\\`)*[^\s])(?<!\\)`/gm, '<code>$1</code>')
// XXX support "\==" in mark...
.replace(/(?<!\\)==(?=[^\s])(.*[^\s])(?<!\\)==/gm, '<mark>$1</mark>')
// characters...
// XXX use ligatures for these???
.replace(/(?<!\\)---(?!-)/gm, '&mdash;')

View File

@ -74,12 +74,23 @@ var setup = function(){
- multiple node selection
- copy/paste nodes/trees
- undo
collapsed:: true
- delete node
- indent/deindent
- edit node
- markdown: tables
collapsed:: true
- /^\s*(\|\s+.*\s+\|)\s*$/m -&gt; &lt;table&gt;&lt;tr&gt;&lt;td&gt;$1&lt;/td&gt;&lt;/tr&gt;&lt;table&gt;
- /\n\s*\|\s+/ -&gt; &lt;tr&gt;&lt;td&gt;
- /\s+\|\s*\n/ -&gt; &lt;/td&gt;&lt;/tr&gt;
- /\s+\|\s+/ -&gt; &lt;/td&gt;&lt;td&gt;
- ASAP: fix quotes
- Example: /\n\s*\|\s+/ -&gt; &lt;tr&gt;&lt;td&gt;
- empty item height is a bit off...
- handle links gracefully
- ~handle links gracefully -- open/edit
_just click in the empty space_~
- ~<a href="about:blank">this takes the whole element</a>~
- this breaks if link is exactly line width -- should we ensure empty space?
- ~serialize/deserialize~
- ~add optional text styling to nodes~
-
@ -110,6 +121,7 @@ var setup = function(){
- ---
- Markers: ASAP, BUG, FIX, HACK, STUB, WARNING, and CAUTION
- Basic inline *bold*, _italic_ and ~striked~
- Marking ==text==
- Inline [X] checkboxes [_]
- To do items/blocks
- [_] undone item