Permalink
Browse files

Add submit handler to automatically get the markup of the editor and set

the val of the textarea
  • Loading branch information...
1 parent 21a14f3 commit 2bc5346462f325d30e21215bad79f0919fb4dbbf @nhowell committed Dec 1, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/wysihat/editor.js
View
@@ -25,6 +25,10 @@ WysiHat.Editor = {
$textarea.hide();
+ $textarea.closest('form').submit(function() {
+ $textarea.val(WysiHat.Formatting.getApplicationMarkupFrom($editArea));
+ });
+
// WysiHat.BrowserFeatures.run()
return $editArea;

0 comments on commit 2bc5346

Please sign in to comment.