Zum Hauptinhalt wechseln

CKEditor5 - Open Links in New Tab

This is how to activate the “Open in a new tab” option for the rich text editor in CKEditor5.

function ( options ) {
  // link - activate "Open in a new tab" switch
  options.editorOptions.link = {
    decorators: {
      openInNewTab: {
        mode: "manual",
        label: "Open in a new tab",
        attributes: {
          target: "_blank",
          rel: "noopener noreferrer"
        }
      }
    }
  };
  return options ;
}

Kommentare

Noch keine Kommentare zu diesem Beitrag.