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:
ff17526
)
improve scrolling a bit
author
Jason Woofenden
<jason@jasonwoof.com>
Tue, 8 Mar 2016 16:31:48 +0000
(11:31 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Tue, 8 Mar 2016 16:31:48 +0000
(11:31 -0500)
editor.coffee
patch
|
blob
|
history
diff --git
a/editor.coffee
b/editor.coffee
index
370f2a1
..
c3f35be
100644
(file)
--- a/
editor.coffee
+++ b/
editor.coffee
@@
-564,7
+564,6
@@
class PeachHTML5Editor
if @options.editor_id?
@outer_iframe.setAttribute 'id', @options.editor_id
@outer_iframe.onload = =>
if @options.editor_id?
@outer_iframe.setAttribute 'id', @options.editor_id
@outer_iframe.onload = =>
- console.log 'outer onload'
@outer_idoc = @outer_iframe.contentDocument
icss = domify @outer_idoc, style: children: [
domify @outer_idoc, text: css
@outer_idoc = @outer_iframe.contentDocument
icss = domify @outer_idoc, style: children: [
domify @outer_idoc, text: css
@@
-723,6
+722,8
@@
class PeachHTML5Editor
@in_el.value = dom_to_html @tree
@in_el.onchange = =>
@load_html @in_el.value
@in_el.value = dom_to_html @tree
@in_el.onchange = =>
@load_html @in_el.value
+ @iframe.style.height = "0"
+ @iframe.style.height = "#{@idoc.body.scrollHeight}px"
kill_cursor: -> # remove it, forget where it was
if @cursor_visible
@cursor_el.parentNode.removeChild @cursor_el
kill_cursor: -> # remove it, forget where it was
if @cursor_visible
@cursor_el.parentNode.removeChild @cursor_el