diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index efb2f85..c49823b 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -357,10 +357,10 @@ var templates = { // button... return header }, - // XXX focus button... + // XXX focus button -- see todo... __focusin__: function(evt, editor, elem){ - //var node = editor.get(elem) - //node.querySelector('button').focus() + //elem.classList.contains('block') + // && elem.querySelector('button').focus() }, __click__: function(evt, editor, elem){ e = evt.target @@ -384,7 +384,7 @@ var templates = { .slice(1) .join('\n') } - // XXX handle cursor placement / selection... + // XXX handle cursor placement / selection markers... // XXX var direction = @@ -395,7 +395,7 @@ var templates = { editor.focus(elem) editor.edit( // XXX BUG? currently this only creates a single node, - // should be recursive... + // should be recursive, i.e. subtree... editor.Block(data, direction)) } }, } diff --git a/experiments/outline-editor/index.html b/experiments/outline-editor/index.html index 3ce3a88..a43874f 100755 --- a/experiments/outline-editor/index.html +++ b/experiments/outline-editor/index.html @@ -50,6 +50,14 @@ var setup = function(){ - - ## Bugs: focused:: true + - BUG: need to account for hidden elements when cursoring between elements + - to reproduce:: + - XXX move from/to this element + - abcdefghijklmnopqrstuvwxyz + - [ ] and to/from this (this produces a small shift compared the the above) + - there's a simple and a complex solutions to this: + - simple: avoid hiding stuff -- not sure if this is achivable + - complex: estimate size of elements, including hidden ones, and account for them - BUG: to level headings style may not be correct... - # H1 - # H2