JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
page to test editor html cleanup and serialization
[peach-html5-editor.git] / editor_tests.coffee
diff --git a/editor_tests.coffee b/editor_tests.coffee
new file mode 100644 (file)
index 0000000..4b995bb
--- /dev/null
@@ -0,0 +1,9 @@
+in_el = document.getElementById 'in'
+out_el = document.getElementById 'out'
+button = document.getElementById 'button'
+button.onclick = ->
+       editor = wheic.wysiwyg in_el
+       out_el.value = wheic.dom_to_html editor.dom
+       return false
+button.value="Cleanup"
+button.removeAttribute 'disabled'