<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>

CC BY-SA 4.0
2024-04-04T12:57:54.110Z
Whow ... this works :)
Marc 
CC BY-SA 4.0
2024-04-04T12:58:33.777Z
Thanks a lot, Ilja!
Marc 
CC BY-SA 4.0
2024-04-04T13:01:09.447Z
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
Max Strebel
CC BY-SA 4.0
2024-04-04T12:49:08.943Z
2024-04-08T05:30:26.777Z
2024-04-08T05:30:26.777Z
ILija  Man
<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>

<ckeditor5>
CKEditor 4: Open Link in new Tab
# 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  

---

