Answers.Body: <pre><code>&quot;link&quot;: {
      &quot;decorators&quot;: {
        &quot;isExternal&quot;: {
          &quot;attributes&quot;: {
            &quot;rel&quot;: &quot;noopener noreferrer&quot;,
            &quot;target&quot;: &quot;_blank&quot;
          },
          &quot;label&quot;: &quot;Open in a new tab&quot;,
          &quot;mode&quot;: &quot;manual&quot;
        }
      }
    },
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-04T12:57:54.110Z
Answers.Text: Whow ... this works :)
Answers.UserDisplayName: Marc 
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-04T12:58:33.777Z
Answers.Text: Thanks a lot, Ilja!
Answers.UserDisplayName: Marc 
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-04T13:01:09.447Z
Answers.Text: Just to add to this, here's the official documentation: https://ckeditor.com/docs/ckeditor5/latest/features/link.html#adding-attributes-to-links-using-the-ui-manual-decorators
Answers.UserDisplayName: Max Strebel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-04-04T12:49:08.943Z
Answers.LastActivityDate: 2024-04-08T05:30:26.777Z
Answers.LastEditDate: 2024-04-08T05:30:26.777Z
Answers.UserDisplayName: ILija  Man
Body: <p>Craft 5 // CKEditor 4</p>
  <p>I'm really missing an option to open a link in a new Tab.</p>
  <ul>
  <li>an external link should open in a new tab by default</li>
  <li>sometimes the redacteur needs to have the option to open an entry in a new tab</li>
  <li>open an asset (pdf) in a new tab</li>
  </ul>
  <p>Even a dirty workaround is not possible: Set <code>target=&quot;_blank&quot;</code> within the code -&gt; it'll be filtered out after saving.</p>
  <p>Do you have any good idea for this?</p>
  
Tags: <ckeditor5>
Title: CKEditor 4: Open Link in new Tab
ThreadText: # CKEditor 4: Open Link in new Tab
  
  (Asked by: username_0 on 2024-04-04)
  
  Craft 5 // CKEditor 4
  
  I'm really missing an option to open a link in a new Tab.
  
  * an external link should open in a new tab by default
  * sometimes the redacteur needs to have the option to open an entry in a new tab
  * open an asset (pdf) in a new tab
  
  Even a dirty workaround is not possible: Set `target="_blank"` within the code -> it'll be filtered out after saving.
  
  Do you have any good idea for this?
  
  **Tags:** ckeditor5
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-04-04. Score: 2 | Accepted answer
  
  ```
  "link": {
      "decorators": {
        "isExternal": {
          "attributes": {
            "rel": "noopener noreferrer",
            "target": "_blank"
          },
          "label": "Open in a new tab",
          "mode": "manual"
        }
      }
    },
  
  ```
  
  > **Comments:**
  > **username_0**: Whow ... this works :)  
  > **username_0**: Thanks a lot, Ilja!  
  > **username_2**: Just to add to this, here's the official documentation: https://ckeditor.com/docs/ckeditor5/latest/features/link.html#adding-attributes-to-links-using-the-ui-manual-decorators  
  
  ---
  
  