How to get TinyMCE and Jquery validate to work together?
- by chobo2
Hi
I am using jquery validate and the jquery version of tinymce.
I found this piece of code that makes tinymce to validate itself every time something changes in it.
Hi
I am using the jquery validate with my jquery tinymce so I have this in my code
// update validation status on change
onchange_callback: function (editor)
{
tinyMCE.triggerSave();
$("#" + editor.id).valid();
},
This works however there is one problem. If a user copies something from word it brings all that junk styling with it what is usually over 50,000 characters. This is way over my amount of characters a user is allowed to type in.
So my jquery validation method goes off telling me that they went over the limit. In the mean time though tinymce has cleaned up that mess and it could be possible now the user has not gone over the limit.
Yet the message is still there.
So is there a better function call I can put this in? Maybe tell tinymce to delay the valid when a paste is happening, or maybe a different callback?
Anyone got any ideas?