Quantcast
Channel: CKEditor™ Provider for DNN®
Viewing all articles
Browse latest Browse all 1992

Commented Unassigned: CKEditor hidden after form validated false [8067]

$
0
0
After i submit my form has validatecontrol, the CKEditor is destroyed (hidden). how i can re-show CKEditor after it hide?
Comments: ** Comment from web user: thienvc **

__Im using in my custom module,__

You destroy CKE when form submit, i found on your render code
But when ValidatorOnSubmit is False, the form is cancel submit, but CKE still destroyed
<script type="text/javascript">
//<![CDATA[
function WebForm_OnSubmit() {
if (CKEDITOR && CKEDITOR.instances && CKEDITOR.instances.dnn_ctr5501_AdminEditArticle_txtContent_txtContent) { CKEDITOR.instances.dnn_ctr5501_AdminEditArticle_txtContent_txtContent.updateElement(); CKEDITOR.instances.dnn_ctr5501_AdminEditArticle_txtContent_txtContent.destroy(); };
__if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;__
return true;
}
//]]>
</script>

i think you must fix in this
<script type="text/javascript">
//<![CDATA[
function WebForm_OnSubmit() {
//Move validator check on top
__if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;__

//If validator isValid, then destroy CKE instances
if (CKEDITOR && CKEDITOR.instances && CKEDITOR.instances.dnn_ctr5501_AdminEditArticle_txtContent_txtContent) { CKEDITOR.instances.dnn_ctr5501_AdminEditArticle_txtContent_txtContent.updateElement(); CKEDITOR.instances.dnn_ctr5501_AdminEditArticle_txtContent_txtContent.destroy(); };

return true;
}
//]]>
</script>

Thanks for your reply.


Viewing all articles
Browse latest Browse all 1992

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>