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

defaultLinkTarget is not used in CKEDITOR.plugins.ae_autolink #1534

Closed
bettysteger opened this issue Jul 4, 2022 · 0 comments · Fixed by #1536
Closed

defaultLinkTarget is not used in CKEDITOR.plugins.ae_autolink #1534

bettysteger opened this issue Jul 4, 2022 · 0 comments · Fixed by #1536

Comments

@bettysteger
Copy link
Contributor

Do you want to request a feature or report a bug?
bug

What is the current behavior?
If I set defaultLinkTarget to _blank and I paste an URL inside the alloyeditor, it does not add the configured default target, in this case _blank.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  1. Set the following config (defaultLinkTarget)
  2. Paste an URL inside the alloyeditor, it does not add the configured default target, in this case _blank.
        buttonCfg: {
          linkEdit: {
            defaultLinkTarget: '_blank'
          }
        }

Problem is that the CKEDITOR.plugins.ae_autolink only adds the following:

if (instance._isValidURL(url)) {
  if (instance._isValidEmail(url)) {
    return '<a href="mailto:' + url + '">' + url + '</a>';
  } else {
    return '<a href="' + url + '">' + url + '</a>';
  }
}

What is the expected behavior?
The link should open in a new tab, if defaultLinkTarget is set to _blank.

Which versions of alloy-editor, and which browser / OS are affected by this issue? Did this work in previous versions?
Alloy-editor 2.14.7

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