Streaming live at 10am (PST)

Open Rich Text Link In New Window


Is there an option for this somewhere or do we need to approach it differently?

Opening links in a new tab created in CMS Rich Text
Linking to Collections Pages from Dropdown menu
Open rich text links in a new tab - update

Hi @jdesign,
I think for now there is no "easy" way to do this.
But I found out that there is link attribute which control this - "target".
Also I found the code example which force links to open in a new window:
- For external links only, like []:

jQuery(document).ready(function() {
    jQuery(".external-link").attr("target", "_blank");

For all type of links (internal and external):

jQuery(document).ready(function() {
    jQuery(".wiki-content a").attr("target", "_blank");

Try to use it in Custom Code area with your links classes. Hope it helps.



I dropped this code into the custom code section on my website, but it has not made a difference. I'm trying to get links created in the CMS by my client to open a new tab.

Can you clarify what you mean by "try to use it in Custom Code area with your links classes"


"Custom Code area" I meant this part:

And class of your link, which you want to be opened, not .external-link or .wiki-content, but some class that you use.


Great thanks. I'll give this a try.


Isn't the "link class" created by the rich text editor just whatever was established by the "all links" class?


@sabanna I've moved the script to the correct location, but since (to my knowledge) I cannot specify the class of the link that is created in the Rich Text I don't know what to use


What is your Rich Text class name?


On that particular page it is called News Paragraph. See attached screenshot

This is where the link lives in the CMS

I tried using the rich text class name, but it still isn't working

Here is my share link:


In your case it should be like this:

            jQuery(document).ready(function() {
            jQuery(".news-paragraph a").attr("target", "_blank");

Opening links in a new tab created in CMS Rich Text

Yeah!!! Thanks mucho :smile:


Awesome! :v: We did it! :smiley:

closed #13

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.