Roslovets-Inc/strapi-plugin-ckeditor5

Cannot set _target="blank" on links

Closed this issue · 4 comments

finex commented

Hi, on the current strapi-plugin-ckeditor5 you cannot set the _target="blank" on links. Would be possible to add this option (or document how to do)? Thank you.

@finex you can add this code in your config to modify link options:

link: {
    addTargetToExternalLinks: true,
    decorators: {
      openInNewTab: {
        mode: 'manual',
        label: 'Open in a new tab',
        defaultValue: false,
        attributes: {
          target: '_blank',
          rel: 'noopener noreferrer'
        }
      },
    }
  },

>>> docs for reference <<<

@albertpak Thank you! Was looking for a solution to the same problem.

Thanks! Introduced in v1.12.0

finex commented

Thank you :-)