suneditor
suneditor copied to clipboard
Context Menu Implementation
Hi, I have integrated SunEditor in my react project. I need to implement custom context menu on right click. But there is no event handler for the same (Neither onMouseDown nor onContextMenu). Can it be implemented manually, if need be?
Hi @Megamind2301
You can use the onMouseDown or onClick. And it may be helpful to refer to the code in submenuOn and controllersOn.
const editor = suneditor.create(..);
editor.onMouseDown = function (e, core) {
core.controllersOff();
// Edit contextMenuDiv
const menu;
core.controllersOn(menu);
}