Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#9134 closed enhancement (worksforme)

Allow links to open in a new tab or window frame

Reported by: Carsten Klein <carsten.klein@…> Owned by:
Priority: low Milestone:
Component: rendering Version:
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The current link system is well implemented, but I would like to be able to also define links in the wiki that would open in a new window. Currently this can only be achived by marking up the link using standard HTML, which of course is quite a bit of overhead.

I would propose the following to make this work:

When placing links where wiki syntax is being supported, one can prefix the realm by the keyword 'ext', e.g.

[ext:wiki:OpensInNewWindow]

or

ext:http://opens.in.new.window.org

which then would be rendered as

<a href="/wiki/OpensInNewWindow" target="_blank">OpensInNewWindow</a>

or

<a href="http://opens.in.new.window.org/" target="_blank">http://opens.in.new.window.org/</a>

The required changes to the current wiki parser should be minimal.

Attachments (0)

Change History (6)

comment:1 by Remy Blank, 15 years ago

Milestone: 1.0

The target= attribute is not defined in XHTML strict, which is what Trac generates. So the simple solution won't work.

An alternative could be to add the attribute in the DOM after the page has loaded, using JavaScript.

comment:2 by Christian Boos, 15 years ago

Milestone: 1.0unscheduled

Milestone 1.0 deleted

comment:3 by Carsten Klein <carsten.klein@…>, 15 years ago

Using Javascript fails for certain links, I will lookup the required information and post it here, so that perhaps the CSS can be reworked on the behalf of these parts?

in reply to:  3 comment:4 by Carsten Klein <carsten.klein@…>, 15 years ago

Replying to Carsten Klein <carsten.klein@…>:

Using Javascript fails for certain links, I will lookup the required information and post it here, so that perhaps the CSS can be reworked on the behalf of these parts?

Reconsidering this, it could be well made a plugin, so there is actually no need to integrate this into trac. Having said this, I will look into providing a jquery based routine which will update all ext links on document load, for a plugin that I am currently developing.

I think that we can close this.

comment:5 by Carsten Klein <carsten.klein@…>, 15 years ago

Resolution: worksforme
Status: newclosed

I will close this since it can actually be accomplished by a IWikiSyntaxProvider.

comment:6 by Remy Blank, 15 years ago

Milestone: triaging

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.