Hi Pascal,
(% class="plainmessage publish-message" %)((($message)))
the (((…))) construct generates a DIV
For a span you need:
(% class="plainmessage publish-message" %)$message
Thanks
-Vincent
On 19 Oct 2016, at 10:17, Pascal BASTIEN
<pbasnews-xwiki(a)yahoo.fr> wrote:
(I resend my previous message: it seem xwiki users list didn't receive it or silent
reject it)
sorry maybe spaming?
--- En date de : Mar 18.10.16, Pascal BASTIEN <pbasnews-xwiki(a)yahoo.fr> a écrit :
> De: Pascal BASTIEN <pbasnews-xwiki(a)yahoo.fr>
> Objet: riddle: howto insert a simple span with xwiki syntax?
> À: "XWiki Users" <users(a)xwiki.org>
> Date: Mardi 18 octobre 2016, 9h07
> Hello,
>
> With wiki syntax I failed to insert a simple span in a
> velocity macro (Blog./BlogCode):
>
> #macro(publishMessageBox $message)
> (% class="plainmessage publish-message" %)((($message)))
> #end
>
> display:
> <div class="plainmessage publish-message">
> <p>This article was published on 17/10/2016
> 16:47:06</p>
> </div>
>
> and I want a span in front of $message like this:
> <div class="plainmessage publish-message">
> <p><span class="glyphicon
> glyphicon-globe"></span> This article was published
> on 17/10/2016 16:47:06</p>
> </div>
>
> Is it possible (I can not use {{html}} because code is
> escaped)?
>
> Here my test and what is displayed:
> (% class="plainmessage publish-message" %)((((%
> class="glyphicon glyphicon-globe" %)((( )))$message)))
> display
> <div class="plainmessage publish-message">
> <div class="glyphicon glyphicon-globe"></div>
> <p>This article was published on 17/10/2016
> 16:47:06</p>
> </div>
>
> => With div instead span it is ok BUT there are <p>
> inserted :-( !
>
> (% class="plainmessage publish-message" %)((((%
> class="glyphicon glyphicon-globe" %)$message)))
>
> <div class="plainmessage publish-message">
> <p>
> <span class="glyphicon glyphicon-globe">This article
> was published on 17/10/2016 16:47:06</span>
> </p>
> </div>
>
> => span inserted BUT I don't want end of span at the end
> of the $message
>
> (% class="plainmessage publish-message" %)((((%
> class="glyphicon glyphicon-globe" %)((())) $message)))
>
> <div class="plainmessage publish-message">
> <div class="glyphicon glyphicon-globe"></div>
> <p>This article was published on 17/10/2016
> 16:47:06</p>
> </div>
>
> => With div instead span it is ok BUT there are <p>
> inserted :-( !
>
> Have you got a solution?
> Thxs
>
> Pascal B
>