how can FCKeditor be validated for required field using javascript.
Try this,
var EditorInstance = FCKeditorAPI.GetInstance('message') ;
if(EditorInstance.EditorDocument.body.innerText.length<=0)
{
alert("This firld is mandatory");
EditorInstance.EditorDocument.body.focus();
return false;
}
Source:
http://dreamtechworld.wordpress.com/2008/12/06/validating-firld-in-fckeditor-using-javascript/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With