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:
928527c
)
bugfix: text insert one character from the end
author
Jason Woofenden
<jason@jasonwoof.com>
Sun, 20 Mar 2016 00:52:23 +0000
(20:52 -0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Sun, 20 Mar 2016 00:52:23 +0000
(20:52 -0400)
editor.coffee
patch
|
blob
|
history
diff --git
a/editor.coffee
b/editor.coffee
index
7c57510
..
98c199c
100644
(file)
--- a/
editor.coffee
+++ b/
editor.coffee
@@
-1023,10
+1023,10
@@
class PeachHTML5Editor
if needle is parent.attrs.style.substr parent.attrs.style.length - needle
parent.attrs.style = parent.attrs.style.substr 0, parent.attrs.style.length - needle
parent.el.setAttribute parent.attrs.style
- # TODO insert the character now
+ # insert the character
if i is 0
n.text = char + n.text
- else if i is n.text.length - 1
+ else if i is n.text.length
n.text += char
else
n.text =