ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Link decorators not updating the target value inside the link toolbox (edit and close one)

Open flaviubln opened this issue 1 year ago • 1 comments

📝 Provide detailed reproduction steps (if any)

  1. Add a link
  2. Make sure you have a decorator (automatic)
link: {
      decorators: {
        isInternal: {
          mode: 'automatic',
          callback: (url: any) => url.includes('regex here'),
          attributes: {
            target: '_self',
            class: 'fab fa-facebook',
          },
        },
        isExternal: {
          mode: 'automatic',
          callback: (url: any) => !url.includes('regex here'),
          attributes: {
            target: '_blank',
          },
        },
      },
    },
  1. Click on the link inside the link toolbox

✔️ Expected result

One link to be opened in the same tab, another in a new tab

❌ Actual result

Both links are opening in a new tab. The target tag remains blank inside the link toolbox;

  • First affected CKEditor version: Latest
  • Installed CKEditor plugins: Link

I'd rather not use manual decorators.

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

flaviubln avatar Aug 15 '24 14:08 flaviubln

This is not reproducible on my side: https://stackblitz.com/edit/wkhfow?file=main.js,index.html

includes cannot use a regex, maybe that's an issue.

Witoso avatar Aug 20 '24 08:08 Witoso

The issue lacks the feedback we asked for two weeks. Hence, we've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Oct 01 '24 23:10 CKEditorBot

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

CKEditorBot avatar Nov 01 '24 23:11 CKEditorBot