Hi. Clicking in the text area seems a little problematic. I'm using the code below to create my editor. Is it possible to set the focus to the end of the current text on page load?
<textarea cols="80" id="txtComment" name="txtComment" rows="10"></textarea>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace('txtComment',
{
skin: 'v2',
toolbar : 'ContactUs'
});
//]]>
</script>
Thank you.
<textarea cols="80" id="txtComment" name="txtComment" rows="10"></textarea>
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace('txtComment',
{
skin: 'v2',
toolbar : 'ContactUs'
});
//]]>
</script>
Thank you.
Re: Set Focus
for the actual focus part... of course, "editor" here is an actual instance of CK.
It might be possible to move the cursor by "selecting" the end character using CKEDITOR.dom.selection... sadly, the API doesn't say anything there.
Re: Set Focus
Continued here viewtopic.php?f=11&t=15900
Re: Set Focus
<script language="javascript">
for (instance in CKEDITOR.instances)
{
var editor = CKEDITOR.instances[instance];
if (editor)
{
editor.focus();
}
}
</script>
Re: Set Focus
CKEDITOR.replace('txtComment',
{
on:
{
'instanceReady': function(evt) {
//Set the focus to your editor
CKEDITOR.instances.txtComment.focus();
}
},
});
//]]>