I have never seen (and no-one else has reported) the problem you described.
My first guess at the cause of your problem would be that you are
initializing the editor before the page is in a ready state.
Rather than this:
<script type="text/javascript">$(function() {$
("#Form_Body").cleditor({width:"100%", height:"100%"});});</script>
Try something like this:
<script type="text/javascript">$(document).ready(function() {$
("#Form_Body").cleditor({width:"100%", height:"100%"});});</script>
Hope this helps,
Chris
P.S. Sorry it took so long to get back to you , but I have been swamped
since I returned from vacation.
-----Original Message-----
From: cled...@googlegroups.com [mailto:cled...@googlegroups.com] On Behalf
Of rak
Why not a mouseenter on body?
Is it possible to write new plugins for Vanilla? Maybe you can try to
override the process to create new textareas with a plugin.
/ Alex
2010/9/3 rak <in...@mirabiliamedia.com>:
Well, you definitely should be using the jquery ready method. You do not
want to start initializing new editors before the browser is ready.
During initialization, CLEditor hides its textarea then creates and shows
the iframe. I suspect that there is some Vanilla code that runs after
CLEditor's initialization which is showing ALL textareas (including
CLEditor's hidden textarea) and this is why you are seeing both the HTML and
WYSIWYG views and also why clicking the HTML button a couple times fixes the
problem.
I think your best bet at resolving this problem would be to track down the
Vanilla code that is showing ALL textareas. Any textarea that is associated
with CLEditor will have a jquery .data("cleditor") value set to its
associated cleditor object. This way you could differentiate between
CLEditor textareas and others.
Hope this helps,
Chris
Hmm, isn’t that basically the same thing as .live() ?
You definitely have several problems with CLEditor and it probably has
something to do with the 14 external javascript files. I have not spent much
time digging into it, but it appears that most of these javascript files are
not even being used.
The following line in the resetCommentForm function is probably the cause of
your problems:
$(parent).find('textarea').show();
You really should not have any code that shows, hides resizes or focuses the
textarea since it is supposed to be initially hidden. Let CLEditor manage
the textarea and you manage its value.
Once you have isolated the cause of your problem, you could also get rid of
the live function completely.
Hope this helps,
Chris
-----Original Message-----
From: cled...@googlegroups.com [mailto:cled...@googlegroups.com] On Behalf
Of rak
Sent: Friday, September 03, 2010 1:31 PM
To: cleditor
What you want to do is place your textarea inside a div, initialize CLEditor
with {width:"100%", height:"100%"}, then apply all your resize logic to your
div. After you have resized your div, call CLEditor's refresh method.
Calling the refresh will force CLEditor to resize the textarea and iframe.