JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
update docs
[peach-html5-editor.git] / editor_tests.coffee
index 5777244..27a891d 100644 (file)
@@ -1,13 +1,15 @@
 in_el = document.getElementById 'in'
-out_el = document.getElementById 'out'
 button = document.getElementById 'button'
 editor = null
 button.onclick = in_el.onchange = in_el.onkeyup = ->
+       #button.value="Reload"
        if editor?
-               editor.load_html in_el
+               editor.load_html in_el.value
        else
-               editor = wheic.wysiwyg in_el
-       editor.iframe.contentDocument.body.innerHTML = out_el.value = wheic.dom_to_html editor.dom
+               # first run
+               button.parentNode.removeChild button
+               editor = peach.wysiwyg in_el
        return false
-button.value="Cleanup"
+button.value="Load"
 button.removeAttribute 'disabled'
+button.click()