我有一个启用了内联编辑的 CKEditor 实例。它工作正常,但我还有一个 [Edit] 按钮,我想在单击按钮时触发内联编辑(并专注于文本)。
这可能吗?
你需CKEDITOR.editor.focus()
要这样做(参见jsFiddle)。
你可以这样使用
CKEDITOR.inline(myId);
function onButtonClick()
{
myId.focus();
}
试试这个javascript代码来解决:关注ckeditor inline
$(btn).on('click', function(event) {
event.preventDefault();
$("#ckeditor_id").focus();
});