How to overwrite click event?
Opened this issue · 1 comments
SmartKent commented
If you have a feature suggestion, please add it on the Feature List instead.
Expected behavior.
Overwrite click event on linkable content, let's say there inserted one link to https//www.google.com, its text its GOOGLE,
then we clicking GOOGLE, it'll popup one wndow like below:
I don't want such popup showed there, however, I'll popup my window, how can I do that?
I'm using below code during construct:
const editor = new FroalaEditor(editorElement, {
key: this.FROALA_KEY,
events: {
'click': function (clickEvent) {
// Do something here.
// this is the editor instance.
clickEvent.preventDefault();
clickEvent.stopPropagation();
alert();
console.log('clicked!!', clickEvent.target);
return false;
}
}
}
);
But it's not working.
Thanks a lot,
Kent
Actual behavior.
Still popup Froala window when liking one linkable content inside editor.
Steps to reproduce the problem.
(Describe the steps to reproduce the problem here. A jsFiddle is awesome when possible.)
Editor version.
"angular-froala-wysiwyg": "^4.2.0"
OS.
(OS name and version here)
Browser.
(Browser name an version here)
Recording.
(A recording showing how to reproduce the problem)
nimitbhagatofficial commented