Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f149693
)
update (textarea) after delete/backspace
author
Jason Woofenden
<jason@jasonwoof.com>
Sat, 12 Mar 2016 18:28:51 +0000
(13:28 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Sat, 12 Mar 2016 18:28:51 +0000
(13:28 -0500)
editor.coffee
patch
|
blob
|
history
diff --git
a/editor.coffee
b/editor.coffee
index
b7406dd
..
e1937a0
100644
(file)
--- a/
editor.coffee
+++ b/
editor.coffee
@@
-757,6
+757,7
@@
class PeachHTML5Editor
@cursor[0].text = @cursor[0].text.substr(0, @cursor[1] - 1) + @cursor[0].text.substr(@cursor[1])
@cursor[0].el.nodeValue = @cursor[0].text
@move_cursor [@cursor[0], @cursor[1] - 1]
@cursor[0].text = @cursor[0].text.substr(0, @cursor[1] - 1) + @cursor[0].text.substr(@cursor[1])
@cursor[0].el.nodeValue = @cursor[0].text
@move_cursor [@cursor[0], @cursor[1] - 1]
+ @changed()
return false
when KEY_DELETE
return false unless @cursor?
return false
when KEY_DELETE
return false unless @cursor?
@@
-764,6
+765,7
@@
class PeachHTML5Editor
@cursor[0].text = @cursor[0].text.substr(0, @cursor[1]) + @cursor[0].text.substr(@cursor[1] + 1)
@cursor[0].el.nodeValue = @cursor[0].text
@move_cursor [@cursor[0], @cursor[1]]
@cursor[0].text = @cursor[0].text.substr(0, @cursor[1]) + @cursor[0].text.substr(@cursor[1] + 1)
@cursor[0].el.nodeValue = @cursor[0].text
@move_cursor [@cursor[0], @cursor[1]]
+ @changed()
return false
when KEY_ENTER
return false
return false
when KEY_ENTER
return false