mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-25 20:31:58 +00:00
Compare commits
No commits in common. "6085ba9fc871abca2eb2fd9b2b370b6545b34533" and "97e511ce7ed1d0efc49ea74cbb3572c0b21b1365" have entirely different histories.
6085ba9fc8
...
97e511ce7e
@ -29,6 +29,7 @@ function clickPoint(x,y){
|
||||
// box corresponds the to desired coordinates. This accounts for nested
|
||||
// elements.
|
||||
//
|
||||
// XXX can we avoid tracking "virtual" newlines between text/block elements???
|
||||
// XXX do a binary search??
|
||||
var getCharOffset = function(elem, x, y, data){
|
||||
data = data ?? {}
|
||||
@ -131,6 +132,7 @@ var getMarkdownOffset = function(markdown, text, i){
|
||||
if(m >= markdown.length){
|
||||
m = p } }
|
||||
return m - t }
|
||||
|
||||
var offsetAt = function(A, B, i){
|
||||
i ??= A.length-1
|
||||
var o = 0
|
||||
@ -144,9 +146,6 @@ var offsetAt = function(A, B, i){
|
||||
p = o }
|
||||
return o }
|
||||
|
||||
|
||||
// Get element text content...
|
||||
//
|
||||
// NOTE: this is the same as .innerText but will not add extra "\n" after
|
||||
// each block element...
|
||||
var getTexts = function(elem, res=[]){
|
||||
@ -160,6 +159,7 @@ var getText = function(elem){
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// Plugins...
|
||||
|
||||
@ -2248,20 +2248,20 @@ var Outline = {
|
||||
c: function(evt){
|
||||
if(!this.get('edited')){
|
||||
this.crop() } },
|
||||
c_z: function(evt){
|
||||
if(!this.get('edited')){
|
||||
evt.preventDefault()
|
||||
this.undo() } },
|
||||
c_s_z: function(evt){
|
||||
if(!this.get('edited')){
|
||||
evt.preventDefault()
|
||||
this.redo() } },
|
||||
U: function(evt){
|
||||
if(!this.get('edited')){
|
||||
this.redo() } },
|
||||
u: function(evt){
|
||||
if(!this.get('edited')){
|
||||
this.undo() } },
|
||||
c_z: function(evt){
|
||||
if(!this.get('edited')){
|
||||
evt.preventDefault()
|
||||
this.undo() } },
|
||||
c_s_z: function(evt){
|
||||
if(!this.get('edited')){
|
||||
evt.preventDefault()
|
||||
this.redo() } },
|
||||
U: function(evt){
|
||||
if(!this.get('edited')){
|
||||
this.redo() } },
|
||||
u: function(evt){
|
||||
if(!this.get('edited')){
|
||||
this.undo() } },
|
||||
|
||||
Delete: function(evt){
|
||||
var edited = this.get('edited')
|
||||
|
||||
@ -141,14 +141,6 @@ var setup = function(){
|
||||
|text|text|text|
|
||||
-
|
||||
- ## ToDo:
|
||||
- FEATURE dunamic headings -- level depends on number of headings above..c
|
||||
- syntax:
|
||||
```
|
||||
@ Heading
|
||||
```
|
||||
- would be logical to:
|
||||
- only first top level heading is level 1
|
||||
- subsequent top level headings all level 2
|
||||
- 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_
|
||||
- Might be a good idea to think how to avoid the constant selections on focus...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user