Closed lehno closed 2 hours ago
document.addEventListener('click', (evt) => {
const positionContext = this.editor.command.getPositionContextByEvent(evt);
if (positionContext?.element?.control?.conceptId === 'mergeField') {
console.log(positionContext);
}
});
What problem does this feature solve?
I created a few custom plugins to show formated data in the editor. I would like to click on it and invoke an external function to open a popup or something else
What does the proposed API look like?
When adding a control, be able to send a function as a click callback or be able to listen to mouse click event and check if click has element with control extension