Link decorators not updating the target value inside the link toolbox (edit and close one)
📝 Provide detailed reproduction steps (if any)
- Add a link
- 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',
},
},
},
},
- 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.
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.
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.
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).