Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Make links open in new window?

Is there a way to modify the plugin so links inserted with CLEditor open in a new window?
0
Comments
I added some javascript to the bottom of my default.master.tpl, to ensure that all links even if they are added in source mode open in a new window.
Maybe a bit of a ghetto fix but it's easy to install
http://pastebin.com/GKPPQ3HP
There was an error rendering this rich post.
@Tama Looks great, thank you!
@Celeste If you don't want all the links to open in a new page but just the attachments you can also use this small code also in between {literal } tags for tpl . If you copy this remove the spaces I added between the < > so they could show here.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder Is an inserted link considered an attachment?
We can use the target="_blank" attribute to force opening in a new window/tab.
This is javascript (using jQuery) that finds all
a
children of the.MessageList
element and adds the attributetarget
set to_blank
. Any links posted in the discussion will open in a blank tab.Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@hgtonight Thank you!
Actually, @hgtonight — that has a flaw, which is that it seems to also affect links like usernames and date permalinks. I just want it to work if someone inserts a link to another website in their discussion post/comment. How does CLEditor form the code that makes the links? It seems like there should be some way to edit that as opposed to the overall theme.
If you are familiar with CSS selectors, you can choose which ever you would like to put in the
$('Selectors here')
part of the previous code snippet.For example:
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@hgtonight Perfect! Thanks again
Hello guys,
I'm trying this solution without any luck.
Where is this code supposed to be placed on default.master.tpl?
It's making my page crash
NVM found the solution. we need to add it as follows:
Mind the extra space after < and before > . These should be removed
post what you did!
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
It's up there !