You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am adapting the plugin, it's working great so far. The only issue i'm having is that when the ckeditor is invoked by any component that requires it, the cursor is not inserted inside the element that is going to be edited.
My suspicion is that the focus action of the rte object is being fired before the instance is completely ready but i'm not 100% sure. The workaround for this issue was delaying the call of the focus action of the ckeditor object.
focus(el, rte) {
// Do nothing if already focused
if (rte && rte.focusManager.hasFocus) {
return;
}
el.contentEditable = true;
if(rte) {
setTimeout(function() {
rte.focus();
}, 500);
}
}
This is a hackish solution but i'm not sure how to deal with this situation, maybe there's a hook or listener where i can verify if the instance is ready to fire the focus action. I would gladly propose a pull request if there's something within the plugin range to fix this. It could be that this goes more into the Ckeditor territory.
Cheers!
The text was updated successfully, but these errors were encountered:
yanfanvip
added a commit
to yanfanvip/grapesjs-plugin-ckeditor
that referenced
this issue
Nov 6, 2021
Hi!
i am adapting the plugin, it's working great so far. The only issue i'm having is that when the ckeditor is invoked by any component that requires it, the cursor is not inserted inside the element that is going to be edited.
My suspicion is that the focus action of the rte object is being fired before the instance is completely ready but i'm not 100% sure. The workaround for this issue was delaying the call of the focus action of the ckeditor object.
This is a hackish solution but i'm not sure how to deal with this situation, maybe there's a hook or listener where i can verify if the instance is ready to fire the focus action. I would gladly propose a pull request if there's something within the plugin range to fix this. It could be that this goes more into the Ckeditor territory.
Cheers!
The text was updated successfully, but these errors were encountered: