2
votes

I have a CKEditor instance with inline editing enabled. It works fine, but I also have an [Edit] button which I want to trigger inline editing (and focus on the text) when the button is clicked.

Is this possible?

3

3 Answers

1
votes

You need CKEDITOR.editor.focus() to do this (see on jsFiddle).

0
votes

You can use like this

CKEDITOR.inline(myId); 

function onButtonClick()
{
    myId.focus();
}
0
votes

try this javascript code to solve : focus the ckeditor inline

$(btn).on('click', function(event) {
    event.preventDefault();
    $("#ckeditor_id").focus();
});