TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Yogendra Sahu
1.2k
587
138.2k
ckEditors Autofocus
Mar 5 2019 5:17 AM
How do I to set cursor position in the selected ckeditor by providing id to the ckeditors list?
I am having 7 ckeditor in my page and a side menu containing the name/title provided to the ckeditor.I want to set the cursor/setfocus to the selected ckeditor by clicking the title/name of the ckeditor from side menu.
I have used the following:
Code 1
:
//Giving error : scrollIntoView is not a function
var element = editor.document.getById('id');
var range;
if(element)
{
element.scrollIntoView();
range = editor.createRange();
range.moveToPosition(element, CKEDITOR.POSITION_AFTER_START);
editor.getSelection().selectRanges([range]);
}
Code 2
:
onReady(event: any) //giving error : cannot read property focus of undefined
{
setTimeout(() => event.editor.focus(), 1000);
}
please help me out with this
Reply
Answers (
2
)
How to Split Comm Se prated In Jquery
How to close the Current opened Tab and go back to previous