+ idoc.body.onkeyup = (e) ->
+ return false if ignore_key_codes[e.keyCode]?
+ return false if control_key_codes[e.keyCode]?
+ idoc.body.onkeydown = (e) ->
+ return false if ignore_key_codes[e.keyCode]?
+ return false if control_key_codes[e.keyCode]?
+ idoc.body.onkeypress = (e) ->
+ return if e.ctrlKey
+ return false if ignore_key_codes[e.keyCode]?
+ # in firefox, keyCode is only set for non-typing keys
+ if e.keyCode isnt KEY_BACKSPACE # so this is fine
+ return false if control_key_codes[e.keyCode]?
+ char = e.charCode ? e.keyCode
+ el.value += String.fromCharCode char
+ editor_instance.load_html el.value
+ return false
+ if options.stylesheet # TODO test this
+ istyle = idoc.createElement 'style'
+ istyle.setAttribute 'src', options.stylesheet
+ idoc.head.appendChild istyle
+ icss = idoc.createElement 'style'
+ icss.appendChild idoc.createTextNode css
+ idoc.head.appendChild icss
+ editor_instance.load_html el.value
+ return editor_instance
+
+window.peach = {
+ wysiwyg: wysiwyg
+ dom_to_html: dom_to_html
+}