diff --git a/experiments/outline-editor/editor.css b/experiments/outline-editor/editor.css index c357529..06d879b 100755 --- a/experiments/outline-editor/editor.css +++ b/experiments/outline-editor/editor.css @@ -44,7 +44,12 @@ display: block; position: relative; - /* hide the root editor code... */ + /* loading indicator */ + &.loading { + /* XXX */ + } + + /* editor code */ &>.code { display: none; } diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 03ec661..eec1634 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -1907,6 +1907,7 @@ var Outline = { /*/ XXX load: function(data){ var that = this + this.dom.classList.add('loading') data = typeof(data) == 'string' ? this.parse(data) : data instanceof Array ? @@ -1937,10 +1938,12 @@ var Outline = { // //var f = that._syncTextSize.bind(that) // for(var e of [...that.outline.querySelectorAll('textarea')]){ // f(e) } }, 0) + this.dom.classList.remove('loading') return this }, /*/ // XXX JSON version... load: function(data){ var that = this + this.dom.classList.add('loading') data = typeof(data) == 'string' ? this.parse(data) : data instanceof Array ? @@ -1963,6 +1966,7 @@ var Outline = { // //var f = that._syncTextSize.bind(that) // for(var e of [...that.outline.querySelectorAll('textarea')]){ // f(e) } }, 0) + this.dom.classList.remove('loading') return this }, //*/ diff --git a/experiments/outline-editor/index.html b/experiments/outline-editor/index.html index c3ee5ff..36228ae 100755 --- a/experiments/outline-editor/index.html +++ b/experiments/outline-editor/index.html @@ -108,17 +108,9 @@ var setup = function(){ - side margins are a bit too large - still need to account for toolbar to the right - left side does not need to be as wide - - DONE TEST BUG: parser: code blocks do not ignore single back-quotes... - collapsed:: true - - ``` - x = `moo` - ``` - - _this also leads to double quoting of html..._ - ``` - x = `moo` - ``` - - ## ToDo: + - add loading spinner -- `.loading` class set on `.load(..)` and unset when done... - clicking left of the block can select one of parent blocks -- bug or feature?? - `.json(..)`, `.data(..)`, ... should be signature compatible with `.get(..)` (???) - _current state causes constant confusion..._