mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
notes + fixes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b3325c40c4
commit
03b308391f
@ -1781,22 +1781,23 @@ var Outline = {
|
|||||||
this.Block('next')) } },
|
this.Block('next')) } },
|
||||||
Enter: function(evt){
|
Enter: function(evt){
|
||||||
var edited = this.get('edited')
|
var edited = this.get('edited')
|
||||||
// edit -> split text...
|
|
||||||
if(edited){
|
if(edited){
|
||||||
if(evt.ctrlKey
|
if(evt.ctrlKey
|
||||||
|| evt.shiftKey){
|
|| evt.shiftKey){
|
||||||
return }
|
return }
|
||||||
|
// split text...
|
||||||
evt.preventDefault()
|
evt.preventDefault()
|
||||||
var a = edited.selectionStart
|
var a = edited.selectionStart
|
||||||
var b = edited.selectionEnd
|
var b = edited.selectionEnd
|
||||||
var prev = edited.value.slice(0, a)
|
var prev = edited.value.slice(0, a)
|
||||||
var next = edited.value.slice(b)
|
var next = edited.value.slice(b)
|
||||||
edited.value = prev
|
edited.value = prev
|
||||||
this.Block('next')
|
this.Block({text: next}, 'next')
|
||||||
|
// focus next if not at position 0, otherwise keep focus...
|
||||||
|
if(a != 0){
|
||||||
edited = this.edit('next')
|
edited = this.edit('next')
|
||||||
edited.value = next
|
|
||||||
edited.selectionStart = 0
|
edited.selectionStart = 0
|
||||||
edited.selectionEnd = 0
|
edited.selectionEnd = 0 }
|
||||||
return }
|
return }
|
||||||
// view -> edit...
|
// view -> edit...
|
||||||
evt.preventDefault()
|
evt.preventDefault()
|
||||||
|
|||||||
@ -52,7 +52,12 @@ var setup = function(){
|
|||||||
- this node has a second empty line
|
- this node has a second empty line
|
||||||
|
|
||||||
- this is a sibling to the above node
|
- this is a sibling to the above node
|
||||||
- _see code_
|
- BUG: undo: does not handle element splitting correctly...
|
||||||
|
- place cursor somewhere here, hit `Enter`, and then undo.
|
||||||
|
- _this will correctly restore the old node but will not remove the new one_
|
||||||
|
- need to:
|
||||||
|
- add undo to `.Block(..)`
|
||||||
|
- group `new` and `cange` into one undo action...
|
||||||
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
|
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
|
||||||
- FF:
|
- FF:
|
||||||
- zooming on edited field
|
- zooming on edited field
|
||||||
@ -61,8 +66,6 @@ var setup = function(){
|
|||||||
- side margins are a bit too large (account for toolbat to the right)
|
- side margins are a bit too large (account for toolbat to the right)
|
||||||
-
|
-
|
||||||
- ## ToDo:
|
- ## ToDo:
|
||||||
- might be a good idea to focus the prev (empty) node if pressing `Enter` at 0 position
|
|
||||||
- <- place cursor here and press enter
|
|
||||||
- editor as a custom element / web component
|
- editor as a custom element / web component
|
||||||
- DONE data interface:
|
- DONE data interface:
|
||||||
collapsed:: true
|
collapsed:: true
|
||||||
@ -127,6 +130,9 @@ var setup = function(){
|
|||||||
- empty item height is a bit off...
|
- empty item height is a bit off...
|
||||||
- search?
|
- search?
|
||||||
- _...not sure if search should be internal or external yet..._
|
- _...not sure if search should be internal or external yet..._
|
||||||
|
- DONE might be a good idea to focus the prev (empty) node if pressing `Enter` at 0 position
|
||||||
|
collapsed:: true
|
||||||
|
- <- place cursor here and press enter
|
||||||
- DONE make `---` block not show list bullets...
|
- DONE make `---` block not show list bullets...
|
||||||
- DONE: undo: checkboxes and DONE??
|
- DONE: undo: checkboxes and DONE??
|
||||||
collapsed:: true
|
collapsed:: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user