[pmwiki-users] make a span class around the Attach:test.jpg markup

Petko Yotov 5ko at 5ko.fr
Tue Dec 15 01:13:34 CST 2009

On Tuesday 15 December 2009 06:12:14 Matthias Guenther [wikimatze] wrote:
> I want to create some markup in order to put a span around the typical
> Attach markup. The syntax look like:
> (:headline:)Attach:test.jph(:headline:)
> where the wikimarkup for attaching an image should still be execute and
> not display as a plain text. With the following markup I just create
> such plain text instead of exectuting pmwikis-markup. Here is expression:
> Markup('headline',
>  'fulltext',
>  '/\\(:headline:\\)(.*?)\\(:headline:\\)/esi',
>  "'<:block>'.Keep(str_replace(array('&gt;', '&lt;', '&amp;'),
>  array('>', '<', '&'), PSS('<span class=\"headline\">'.'$1'.'</span>')))");

Hi. You could just use a WikiStyle :

 %headline% Attach:image.jpg %%

This will produce exactly what you expect.

See http://www.pmwiki.org/wiki/PmWiki/WikiStyles .


More information about the pmwiki-users mailing list