1
我使用joomla默认编辑器的窗体和jquery验证插件,现在我想验证joomla文本编辑器不应该是空白....我如何验证?如何验证joomla默认的文本编辑器?
我读到一篇文章关于确认对TinyMCE的,我想类似this post
但如果我上比验证工作切换编辑器点击(怎么把它变成teaxarea),但是当存在的Joomla默认的编辑器,然后不显示任何错误,当它是空白
这里是reuired代码
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#addBookForm").validate({
rules: {
description: "required"
},
messages: {
description:"Please write description",
}
});
});
</script>
<form id="addBookForm" action="" method="post" >
<table width="100%" border="0" cellpadding="4" cellspacing="2">
<tr>
<td>Description :</td>
<td >
<?php
$editor =& JFactory::getEditor();
$params = array('smilies'=> '0' ,'style' => '0' ,'layer' => '0' ,'table' => '0' ,'clear_entities'=>'0');
$value = isset($this->data['description']) ? $this->data['description'] : '';
echo $editor->display('description', $value,'400','300','20','20',false, $params);
?>
</td>
</tr>
</table>
</form>
我没有测试你的代码(我离开Joomla项目)......无论如何感谢解决方案 – diEcho 2011-01-24 13:14:54