Skip to main content
Participant
Sep 11, 2017 6:05 PM UTC
Answered

Dreamweaver: Defalut Target_blank Hyperlinks

I copy text with hyperlinks to Dreamweaver. I need all hyperlinks with target _blank. How can I set target_blank to the default target in Dreamweaver. I use the newest version of Dreamweaver.

This topic is closed to new replies. Start a new post to keep the conversation going.
Jon Fritz
Jon FritzCorrect answer
Community Expert
Sep 11, 2017 6:45 PM UTC

You can do this pretty easily using the Find & Replace tool...

1. Hit Ctrl + Shift + F to open the F&R window.
2. Click the "Advanced" tab

3. Under "Find In", change the dropdown menu to "Current Document"

4. Next to the "Find In" field, set the tag to "a"
5. Hit the - icon to get rid of any additional function
6. For "Action" choose "Set Attribute"
7. set the next box to "target"
8. For the "To:" box, choose "_blank"
9. Hit "Replace All" and target="_blank" will be added to all links on the page.

9 replies

Participant
Jan 15, 2020 8:50 PM UTC

It doesn't matter WHY she wants it. No one has answered the question. Can this be setup in DW, that when she creates a hyperlink, the DEFAULT is "_blank"? I need this also and the <base target... is not working within the LMS I use. If someone could actually answer the question, that would be great.

Translate
Nancy OShea
Community Expert
Community Expert
Jan 15, 2020 11:56 PM UTC

I'm afraid not.  The link target attribute in the HTML Properties Panel is empty by default. 

You need to populate the target field yourself.

  • Or use Find & Replace as described by Jon_Fritz_II in the Correct Answer above. 
  • Or create a custom code snippet.

 

Translate
Nancy O'Shea— Product User & Community Expert
Participant
Mar 2, 2021 6:39 PM UTC

Thanks You

Translate
Colin Holgate
Inspiring
Sep 12, 2017 1:59 AM UTC

alexanderh23349409

I think  https://forums.adobe.com/people/Jon%20Fritz%20II answered your exact question. You can mark his reply as Correct, if you agree.

If I read it correct, Alex is the only user of the page, so the question of whether target _blank everywhere is  a good idea shouldn't apply to his case.

Translate
Nancy OShea
Community Expert
Community Expert
Sep 11, 2017 7:01 PM UTC

If all your links go to target_blank, it won't be long before your users will have a lot of opened windows or tabs in their browsers.   See screenshot. 

Is that something you really want to inflict on people?

I think target_blank should be used rarely if at all and only on  outbound links that take people to another website.

Translate
Nancy O'Shea— Product User & Community Expert
Participant
Sep 11, 2017 7:05 PM UTC

I don't use Dreamweaver to develop a webpage. I use it as a html editor to create news.

Translate
Nancy OShea
Community Expert
Community Expert
Sep 11, 2017 7:24 PM UTC

It's irrelevant what you use DW for.  All I'm saying is sticking target_blank on ALL links is not a nice thing to do to people. 

 

Translate
Nancy O'Shea— Product User & Community Expert
Jon Fritz
Community Expert
Jon FritzCommunity ExpertCorrect answer
Community Expert
Sep 11, 2017 6:45 PM UTC

You can do this pretty easily using the Find & Replace tool...

1. Hit Ctrl + Shift + F to open the F&R window.
2. Click the "Advanced" tab

3. Under "Find In", change the dropdown menu to "Current Document"

4. Next to the "Find In" field, set the tag to "a"
5. Hit the - icon to get rid of any additional function
6. For "Action" choose "Set Attribute"
7. set the next box to "target"
8. For the "To:" box, choose "_blank"
9. Hit "Replace All" and target="_blank" will be added to all links on the page.

Translate