Compare commits

..

No commits in common. "50c52ec88df78ac47f42e4018e90fe7061c3e539" and "655c61fdcc843d1c7e903da68e6ab91372e50127" have entirely different histories.

2 changed files with 7 additions and 22 deletions

View File

@ -1120,15 +1120,13 @@ var JSONOutline = {
attrs.splice(i, 1)
: undefined } }
var children = (data.children ?? [])
var children = data.children
.map(function(data){
return that.htmlBlock(data) })
.join('')
// NOTE: the '\n' at the start of the textarea body below helps
// preserve whitespace when parsing HTML...
return (
`<div class="block ${ cls.join(' ') }" tabindex="0" ${ attrs.join(' ') }>\
<textarea class="code text" value="${ data.text }">\n${ data.text }</textarea>\
<textarea class="code text" value="${ data.text }">${ data.text }</textarea>\
<span class="view text">${ parsed.text }</span>\
<div class="children">${ children }</div>\
</div>`) },

View File

@ -48,38 +48,27 @@ var setup = function(){
-
- ## Bugs:
focused:: true
- BUG: styling error...
- this _seems `to` work_
- `while` _this `does` not_
- _seems to be connected with quoting..._
- BUG leading/trailing blank lines mishandled:
- blank line at end of block is initially not shown
- this block contains two lines (empty below)
- `editor.Block(editor.data(editor.get())).querySelector('.view').innerHTML` -- '\n' present
- _...is this a resize issue???_
-
this block also contains two lines (empty above)
-
this block contains three lines (empty above and below)
- DONE blank line at start of block is shown but removed on edit
collapsed:: true
- blank line at start of block is shown but removed on edit
-
this block also contains two lines (empty above)
- `editor.data(editor.get()).text` -- no `\n` at start...
- `editor.get().querySelector('.code').value` -- no `\n` at start...
- ```
d = document.createElement('div')
d.innerHTML = editor.htmlBlock({text: '\nabc\n'}) // -> '\n' exists...
d.querySelector('.code').value // -> no '\n' at start...
```
...seems that the `\n` is lost on html parse...
-
this block contains three lines (empty above and below)
- _this seams to be a problem only on the initial render -- edit/exit fixes the issue..._
- _Q: are we using different code paths for initial render and element render???_
- BUG: styling error...
- this _seems `to` work_
- `while` _this `does` not_
- _seems to be connected with quoting..._
- BUG: can't move down out of a code block
- edit this line, then move down
- ```
@ -155,8 +144,6 @@ var setup = function(){
```
-
- ## ToDo:
- `.json(..)`, `.data(..)`, ... should be signature compatible with `.get(..)` (???)
- _current state causes constant confusion..._
- 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_
- Q: Make the heading level depend on its depth??