[xwiki-users] XWiki Syntax 2.0: is it possible to escape newline
Hello, using a non-WYSIWIG editor my text lines can get quite large (especially when some markup is included). With 1.0 syntax this was no problem: line one still line one is rendered in one line. Is it possible to achieve a similar behaviour with 2.0 (2.1)? Like: line one ~ still line one or: line one \ still line one (both examples result in two rendered lines) (from http://en.wikipedia.org/wiki/%5C: In the context of line-oriented text, especially source code for some programming languages, it is often used at the end of a line to indicate that the trailing newline character should be ignored, so that the following line is treated as if it were part of the current line. In this context it may be called a "continuation". The GNU make manual says, "We split each long line into two lines using backslash-newline; this is like using one long line, but is easier to read.") Thank You Frank
Hi Frank, On Apr 10, 2012, at 2:30 PM, Frank Fischer wrote:
Hello, using a non-WYSIWIG editor my text lines can get quite large (especially when some markup is included).
With 1.0 syntax this was no problem:
line one still line one
is rendered in one line.
Is it possible to achieve a similar behaviour with 2.0 (2.1)?
Like:
line one ~ still line one
or:
line one \ still line one
(both examples result in two rendered lines)
(from http://en.wikipedia.org/wiki/%5C: In the context of line-oriented text, especially source code for some programming languages, it is often used at the end of a line to indicate that the trailing newline character should be ignored, so that the following line is treated as if it were part of the current line. In this context it may be called a "continuation". The GNU make manual says, "We split each long line into two lines using backslash-newline; this is like using one long line, but is easier to read.")
When we created the XWiki Syntax 2.0 we decided that all characters should be meaningful so if you put a newline it's going to be rendered. Could you explain the problem you have with it? You say your lines can get quite large. But whatever editor you're using, it's usually going to wrap them so that they fit on your screen. Now if you really want this behavior you could use the {{velocity}} macro which supports filters (see http://extensions.xwiki.org/xwiki/bin/view/Extension/Velocity+Macro+Filter). For example: {{velocity filter="html"}} line one still line one {{/velocity}} I agree that we could easily refactor this in a more generic macro independent of scripting languages. For example something like: {{filter name="html"}} line one still line one {{/filter}} Would that answer your need? We could decide to escape the last char as you suggested too. I'm not sure about this though but why not. It would need a vote since it's changing the current syntax. Also it could only be implemented in XWiki Syntax 2.2 since we keep backward compatibility for all syntaxes. Let us know what would work for you. Thanks -Vincent
See http://jira.xwiki.org/browse/XRENDERING-167 On Tue, Apr 10, 2012 at 2:30 PM, Frank Fischer <[email protected]> wrote:
Hello, using a non-WYSIWIG editor my text lines can get quite large (especially when some markup is included).
With 1.0 syntax this was no problem:
line one still line one
is rendered in one line.
Is it possible to achieve a similar behaviour with 2.0 (2.1)?
Like:
line one ~ still line one
or:
line one \ still line one
(both examples result in two rendered lines)
(from http://en.wikipedia.org/wiki/%5C: In the context of line-oriented text, especially source code for some programming languages, it is often used at the end of a line to indicate that the trailing newline character should be ignored, so that the following line is treated as if it were part of the current line. In this context it may be called a "continuation". The GNU make manual says, "We split each long line into two lines using backslash-newline; this is like using one long line, but is easier to read.")
Thank You Frank _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
Thank you both for your quick answers! http://jira.xwiki.org/browse/XRENDERING-167 really is my problem. A quick (and bad) example is a list of links in one line: --------------------------------------------------------------------------------- xwiki: [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] - [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] --------------------------------------------------------------------------------- this is rendered as xwiki:Platform (Features] <http://platform.xwiki.org/xwiki/bin/view/Main/>-Component Module <http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module>-Writing XWiki components <http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents>-GitHub <https://github.com/xwiki>-User's Guide <http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/>-Getting started <http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/>-Syntax <http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax>-Administrator's Guide <http://platform.xwiki.org/xwiki/bin/view/AdminGuide/>-Developer's Guide <http://platform.xwiki.org/xwiki/bin/view/DevGuide/>-Development Zone <http://dev.xwiki.org/xwiki/bin/view/Main/>-Platform Features <http://platform.xwiki.org/xwiki/bin/view/Features/>-Extensions <http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome>-FAQ <http://www.xwiki.org/xwiki/bin/view/FAQ/> --------------------------------------------------------------------------------- If i needed to edit this (wrapped) line it is very hard to find something (where is the GitHub link?). this way: --------------------------------------------------------------------------------- xwiki: ~ [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - ~ [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - ~ [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - ~ [[GitHub>>https://github.com/xwiki]] - ~ [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - ~ [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - ~ [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - ~ [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - ~ [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - ~ [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - ~ [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - ~ [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - ~ [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] --------------------------------------------------------------------------------- it would be much easier. A macro that only escapes the newlines but preserves all the markup for the renderer might be a solution. {{filter name="escapeNewlines"}} ... line one ~ still line one second line ... {{/filter}} But i am new to XWiki (but wrote a lot of private code for JSPWiki) so i don't know if this is possible. Frank On 04/10/2012 02:50 PM, Thomas Mortagne wrote:
See http://jira.xwiki.org/browse/XRENDERING-167
On Tue, Apr 10, 2012 at 2:30 PM, Frank Fischer<[email protected]> wrote:
Hello, using a non-WYSIWIG editor my text lines can get quite large (especially when some markup is included).
With 1.0 syntax this was no problem:
line one still line one
is rendered in one line.
Is it possible to achieve a similar behaviour with 2.0 (2.1)?
Like:
line one ~ still line one
or:
line one \ still line one
(both examples result in two rendered lines)
(from http://en.wikipedia.org/wiki/%5C: In the context of line-oriented text, especially source code for some programming languages, it is often used at the end of a line to indicate that the trailing newline character should be ignored, so that the following line is treated as if it were part of the current line. In this context it may be called a "continuation". The GNU make manual says, "We split each long line into two lines using backslash-newline; this is like using one long line, but is easier to read.")
Thank You Frank _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
of course it is rendered as: xwiki: Platform (Features) - Component Module - Writing XWiki components - GitHub - User's Guide - Getting started - Syntax - Administrator's Guide - Developer's Guide - Development Zone - Platform Features - Extensions - FAQ Frank
Hi Franck, See below On Apr 10, 2012, at 3:28 PM, Frank Fischer wrote:
Thank you both for your quick answers!
http://jira.xwiki.org/browse/XRENDERING-167 really is my problem.
A quick (and bad) example is a list of links in one line: --------------------------------------------------------------------------------- xwiki: [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] - [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] --------------------------------------------------------------------------------- this is rendered as
xwiki:Platform (Features] <http://platform.xwiki.org/xwiki/bin/view/Main/>-Component Module <http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module>-Writing XWiki components <http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents>-GitHub <https://github.com/xwiki>-User's Guide <http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/>-Getting started <http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/>-Syntax <http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax>-Administrator's Guide <http://platform.xwiki.org/xwiki/bin/view/AdminGuide/>-Developer's Guide <http://platform.xwiki.org/xwiki/bin/view/DevGuide/>-Development Zone <http://dev.xwiki.org/xwiki/bin/view/Main/>-Platform Features <http://platform.xwiki.org/xwiki/bin/view/Features/>-Extensions <http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome>-FAQ <http://www.xwiki.org/xwiki/bin/view/FAQ/>
---------------------------------------------------------------------------------
If i needed to edit this (wrapped) line it is very hard to find something (where is the GitHub link?).
this way: --------------------------------------------------------------------------------- xwiki: ~ [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - ~ [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - ~ [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - ~ [[GitHub>>https://github.com/xwiki]] - ~ [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - ~ [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - ~ [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - ~ [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - ~ [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - ~ [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - ~ [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - ~ [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - ~ [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] --------------------------------------------------------------------------------- it would be much easier.
A macro that only escapes the newlines but preserves all the markup for the renderer might be a solution.
{{filter name="escapeNewlines"}} ... line one ~ still line one second line ... {{/filter}}
But i am new to XWiki (but wrote a lot of private code for JSPWiki) so i don't know if this is possible.
Yes it's possible ;) As I said in my answer this is already possible. Try this in your wiki: {{velocity filter="html"}} [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] - [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] {{/velocity}} Thanks -Vincent
Frank
On 04/10/2012 02:50 PM, Thomas Mortagne wrote:
See http://jira.xwiki.org/browse/XRENDERING-167
On Tue, Apr 10, 2012 at 2:30 PM, Frank Fischer<[email protected]> wrote:
Hello, using a non-WYSIWIG editor my text lines can get quite large (especially when some markup is included).
With 1.0 syntax this was no problem:
line one still line one
is rendered in one line.
Is it possible to achieve a similar behaviour with 2.0 (2.1)?
Like:
line one ~ still line one
or:
line one \ still line one
(both examples result in two rendered lines)
(from http://en.wikipedia.org/wiki/%5C: In the context of line-oriented text, especially source code for some programming languages, it is often used at the end of a line to indicate that the trailing newline character should be ignored, so that the following line is treated as if it were part of the current line. In this context it may be called a "continuation". The GNU make manual says, "We split each long line into two lines using backslash-newline; this is like using one long line, but is easier to read.")
Thank You Frank
Ok - i did get what i wanted ;-) , i tested your proposal with another example but was accustomed to the JSPWiki list syntax: *first line <space>still first line *second line <space>still second line If i put this whole list into the macro the second '*' is not at the start of the line. This (and a typo typed by myself) made me think that your first answer would not work for me. But putting each list item into a separate macro works well and is sufficient for me: === works === * {{velocity filter="html"}} [[**Platform** (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] {{/velocity}} * {{velocity filter="html"}} [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}} === does not work (somewhat cleaner) === {{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}} Thank you again Frank
Yes it's possible ;)
As I said in my answer this is already possible. Try this in your wiki:
{{velocity filter="html"}} [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] - [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] {{/velocity}}
Thanks -Vincent
See below On Apr 10, 2012, at 4:28 PM, Frank Fischer wrote:
Ok - i did get what i wanted ;-) ,
i tested your proposal with another example but was accustomed to the JSPWiki list syntax:
*first line <space>still first line *second line <space>still second line
If i put this whole list into the macro the second '*' is not at the start of the line. This (and a typo typed by myself) made me think that your first answer would not work for me.
But putting each list item into a separate macro works well and is sufficient for me:
=== works ===
* {{velocity filter="html"}} [[**Platform** (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] {{/velocity}} * {{velocity filter="html"}} [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
=== does not work (somewhat cleaner) ===
{{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
You need to read: http://extensions.xwiki.org/xwiki/bin/view/Extension/Velocity+Macro+Filter It explains the various filters and how they work. The HTML filter doesn't put any new line. What you want in your second example is: {{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]]$nl * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}} (note the $nl to insert a new line). Thanks -Vincent
Thank you again Frank
Yes it's possible ;)
As I said in my answer this is already possible. Try this in your wiki:
{{velocity filter="html"}} [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] - [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] {{/velocity}}
Thanks -Vincent
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Perfect Frank On 04/10/2012 04:33 PM, Vincent Massol wrote:
See below
On Apr 10, 2012, at 4:28 PM, Frank Fischer wrote:
Ok - i did get what i wanted ;-) ,
i tested your proposal with another example but was accustomed to the JSPWiki list syntax:
*first line <space>still first line *second line <space>still second line
If i put this whole list into the macro the second '*' is not at the start of the line. This (and a typo typed by myself) made me think that your first answer would not work for me.
But putting each list item into a separate macro works well and is sufficient for me:
=== works ===
* {{velocity filter="html"}} [[**Platform** (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] {{/velocity}} * {{velocity filter="html"}} [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
=== does not work (somewhat cleaner) ===
{{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}} You need to read: http://extensions.xwiki.org/xwiki/bin/view/Extension/Velocity+Macro+Filter
It explains the various filters and how they work.
The HTML filter doesn't put any new line.
What you want in your second example is:
{{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]]$nl * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
(note the $nl to insert a new line).
Thanks -Vincent
Thank you again Frank
Yes it's possible ;)
As I said in my answer this is already possible. Try this in your wiki:
{{velocity filter="html"}} [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] - [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] {{/velocity}}
Thanks -Vincent
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hello, I don't really understand need of velocity macro in you use-case. Personally, when I want a new line in list, table ..., I used ((( ))) Then you have: * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]]((( ))) * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]]((( ))) Same result, there are always many path for same result :-D Regards, Arnaud. 2012/4/10 Frank Fischer <[email protected]>:
Perfect
Frank
On 04/10/2012 04:33 PM, Vincent Massol wrote:
See below
On Apr 10, 2012, at 4:28 PM, Frank Fischer wrote:
Ok - i did get what i wanted ;-) ,
i tested your proposal with another example but was accustomed to the JSPWiki list syntax:
*first line <space>still first line *second line <space>still second line
If i put this whole list into the macro the second '*' is not at the start of the line. This (and a typo typed by myself) made me think that your first answer would not work for me.
But putting each list item into a separate macro works well and is sufficient for me:
=== works ===
* {{velocity filter="html"}} [[**Platform** (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] {{/velocity}} * {{velocity filter="html"}} [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
=== does not work (somewhat cleaner) ===
{{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
You need to read: http://extensions.xwiki.org/xwiki/bin/view/Extension/Velocity+Macro+Filter
It explains the various filters and how they work.
The HTML filter doesn't put any new line.
What you want in your second example is:
{{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]]$nl * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
(note the $nl to insert a new line).
Thanks -Vincent
Thank you again Frank
Yes it's possible ;)
As I said in my answer this is already possible. Try this in your wiki:
{{velocity filter="html"}} [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] - [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] {{/velocity}}
Thanks -Vincent
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Apr 10, 2012, at 8:26 PM, Arnaud bourree wrote:
Hello,
I don't really understand need of velocity macro in you use-case. Personally, when I want a new line in list, table ..., I used ((( ))) Then you have: * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]]((( ))) * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]]((( )))
Same result, there are always many path for same result :-D
Except that it's not the same result… ;) What Frank wanted was to have content rendered on a single line but displayed on multiple lines when editing it. Thanks -Vincent
Regards,
Arnaud.
2012/4/10 Frank Fischer <[email protected]>:
Perfect
Frank
On 04/10/2012 04:33 PM, Vincent Massol wrote:
See below
On Apr 10, 2012, at 4:28 PM, Frank Fischer wrote:
Ok - i did get what i wanted ;-) ,
i tested your proposal with another example but was accustomed to the JSPWiki list syntax:
*first line <space>still first line *second line <space>still second line
If i put this whole list into the macro the second '*' is not at the start of the line. This (and a typo typed by myself) made me think that your first answer would not work for me.
But putting each list item into a separate macro works well and is sufficient for me:
=== works ===
* {{velocity filter="html"}} [[**Platform** (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] {{/velocity}} * {{velocity filter="html"}} [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
=== does not work (somewhat cleaner) ===
{{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
You need to read: http://extensions.xwiki.org/xwiki/bin/view/Extension/Velocity+Macro+Filter
It explains the various filters and how they work.
The HTML filter doesn't put any new line.
What you want in your second example is:
{{velocity filter="html"}} * [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]]$nl * [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] {{/velocity}}
(note the $nl to insert a new line).
Thanks -Vincent
Thank you again Frank
Yes it's possible ;)
As I said in my answer this is already possible. Try this in your wiki:
{{velocity filter="html"}} [[Platform (Features]>>http://platform.xwiki.org/xwiki/bin/view/Main/]] - [[Component Module>>http://extensions.xwiki.org/xwiki/bin/view/Extension/Component+Module]] - [[Writing XWiki components>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents]] - [[GitHub>>https://github.com/xwiki]] - [[User's Guide>>http://enterprise.xwiki.org/xwiki/bin/view/UserGuide/]] - [[Getting started>>http://enterprise.xwiki.org/xwiki/bin/view/GettingStarted/]] - [[Syntax>>http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax]] - [[Administrator's Guide>>http://platform.xwiki.org/xwiki/bin/view/AdminGuide/]] - [[Developer's Guide>>http://platform.xwiki.org/xwiki/bin/view/DevGuide/]] - [[Development Zone>>http://dev.xwiki.org/xwiki/bin/view/Main/]] - [[Platform Features>>http://platform.xwiki.org/xwiki/bin/view/Features/]] - [[Extensions>>http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome]] - [[FAQ>>http://www.xwiki.org/xwiki/bin/view/FAQ/]] {{/velocity}}
Thanks -Vincent
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (4)
-
Arnaud bourree -
Frank Fischer -
Thomas Mortagne -
Vincent Massol