Created
December 20, 2010 17:54
-
-
Save johnantoni/748714 to your computer and use it in GitHub Desktop.
tinyMCE fix for use with jQuery.validation plugin and IE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// when using the jquery.validation plugin with a tinymce textarea you will need to write the contents of the tinymce area back into the original textarea for jquery.validation to pick up it's new value | |
// force tinymce content to be written back into original textarea element | |
var content = tinyMCE.activeEditor.getContent(); | |
$("textarea.tinymce").val(content); | |
// if all else fails | |
tinyMCE.triggerSave(); | |
after this you can safely apply jquery validation ala... | |
var validateForm = myForm.validate({ | |
ignore: ".ignore", | |
errorElement: "strong" | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found I had to do