如何使用jQuery隐藏和显示CKEditor? [英] How to hide and show a CKEditor using jQuery?
本文介绍了如何使用jQuery隐藏和显示CKEditor?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下代码应该允许隐藏/显示CKEditor表单
< a onClick =$('#form1 ).hide();>隐藏< / A>
< form action =sample_posteddata.phpmethod =postid =form1>
< textarea id =editor1name =editor1> blabla< / textarea>
< script type =text / javascript> CKEDITOR.replace('editor1'); < /脚本>
< input type =submitvalue =Submit/>
< / form>
然而,这段代码在Chrome上工作正常,但在Firefox上,一旦编辑器'隐藏'点击后跟一个'显示'点击),它变得不可编辑!!
我怎样才能让它在每个浏览器上工作?
谢谢。
解决方案
有关更多信息,请参阅此处。唯一的解决办法是等待CKEditor 3.4的新版本。
The following code should allow to hide/show the CKEditor form
<a onClick="$('#form1').hide();">Hide</a>
<a onClick="$('#form1').show();">Show</a>
<form action="sample_posteddata.php" method="post" id="form1">
<textarea id="editor1" name="editor1">blabla</textarea>
<script type="text/javascript"> CKEDITOR.replace( 'editor1' ); </script>
<input type="submit" value="Submit" />
</form>
However, this code works fine on Chrome but on Firefox, once I have toggled once the editor (one 'hide' click followed by one 'show' click) , it becomes not editable !!
How can I make it work on every browser?
Thank you.
解决方案
It doesn't seem to have a real workaround.
See here for more info. The only solution is to wait for CKEditor new version 3.4.
这篇关于如何使用jQuery隐藏和显示CKEditor?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文