Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to overwrite click event? #4777

Open
SmartKent opened this issue Apr 22, 2024 · 0 comments
Open

How to overwrite click event? #4777

SmartKent opened this issue Apr 22, 2024 · 0 comments

Comments

@SmartKent
Copy link

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,
image

then we clicking GOOGLE, it'll popup one wndow like below:

image

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant