Home > Archive > PHP Pear > March 2007 > Text_Wiki link targets?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Text_Wiki link targets?
|
|
| Jocke Selin 2007-03-13, 8:23 am |
| Hi,
I'm trying to remove the target for the URLs generated by
[http://example.com Example Link]. This WiKi markup code generates a
link like this:
====
<a href="http://example.com" onclick="window.open(this.href,
'_blank'); return false;">Example Link</a>
====
I'd like to remove the onClick element. Or is my only option to set it
to "_self"?
Thanks!
/Jocke
| |
| bertrand Gugger 2007-03-14, 4:11 am |
| Bonjour,
Jocke Selin wrote:
> Hi,
>
> I'm trying to remove the target for the URLs generated by
> [http://example.com Example Link]. This WiKi markup code generates a
> link like this:
> ====
> <a href="http://example.com" onclick="window.open(this.href,
> '_blank'); return false;">Example Link</a>
> ====
> I'd like to remove the onClick element. Or is my only option to set it
> to "_self"?
Try
$wiki =& new Text_Wiki(...);
$wiki->setRenderConf('Xhtml', 'Url', 'target', '');
this should remove any target attribute and this onclick popup, you
should fall on the default target for <A> : "_self"
see
http://wiki.ciaweb.net/yawiki/index...odSetRenderConf
http://wiki.ciaweb.net/yawiki/index...ge=RuleUrl#toc2
In the last, this is a bit buggy as any non blank value will do the
popup, why you have to set it to "". The code should be corrected as to
not build it for "_self" ... I'll do that in the next once I'm set back
lead in Text_Wiki.
--
toggg
| |
| Jocke Selin 2007-03-14, 8:02 am |
| Thanks Bertrand!
On 3/14/07, bertrand Gugger <toggg@php.net> wrote:
>
> Try
>
> $wiki =& new Text_Wiki(...);
> $wiki->setRenderConf('Xhtml', 'Url', 'target', '');
>
>
> this should remove any target attribute and this onclick popup, you
> should fall on the default target for <A> : "_self"
>
> see
> http://wiki.ciaweb.net/yawiki/index...odSetRenderConf
> http://wiki.ciaweb.net/yawiki/index...ge=RuleUrl#toc2
>
> In the last, this is a bit buggy as any non blank value will do the
> popup, why you have to set it to "". The code should be corrected as to
> not build it for "_self" ... I'll do that in the next once I'm set back
> lead in Text_Wiki.
I should have mentioned that I do use:
$oTextWiki->setRenderConf('Xhtml', 'url', 'target', '_self');
to set the target to "_self", but my question was answered when you
suggested setting the value to "".
Therefore, this "fixes" the "problem":
$oTextWiki->setRenderConf('Xhtml', 'url', 'target', '');
I asked because I didn't get that from the documentation.
Merci!!
/Jocke
| |
|
|
|
|
|