You need to be logged in to post in the forum - Log In
An active JCE Pro Subscription is required to post in the forum - Buy a Subscription
- Support
- Forum
- JCE Editor
- How to set focus with Javascript?
Support is currently Offline
Official support hours:
Monday To Friday
From 09:00 To 17:00 Europe/London (BST)
From 09:00 To 17:00 Europe/London (BST)
Please post your question in the Forum and we will get back to you as soon as we can.
Hi JCE,
Using javascript how do I set focus on the JCE editor ?
As a bit of background, I'm building a custom component with nested comments. The comment form is loaded in a hidden div and moved (using jQuery .append) to the appropriate container when a reply button is pressed. The field is re-initialised with the following code and it all works fine.
I just can't set the focus on the JCE editor after it's displayed. I've tried the following.
I'm sure I'm missing something really simple? Thanks in advance
John
Using javascript how do I set focus on the JCE editor ?
As a bit of background, I'm building a custom component with nested comments. The comment form is loaded in a hidden div and moved (using jQuery .append) to the appropriate container when a reply button is pressed. The field is re-initialised with the following code and it all works fine.
tinyMCE.execCommand('mceRemoveControl',false,'jform_comment');
tinyMCE.execCommand('mceAddControl',false,'jform_comment');
I just can't set the focus on the JCE editor after it's displayed. I've tried the following.
tinymce.activeEditor.focus();
tinymce.EditorManager.get('jform_comment').focus();
tinyMCE.get('jform_comment').getBody().focus();
tinyMCE.get('jform_comment').focus();
I'm sure I'm missing something really simple? Thanks in advance
John
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!