Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-5289

Make possible to directly return Block result with JRS223 script macros

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4 M1
    • Fix Version/s: 2.4 M2
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      That's very useful for some use case where you already have the block and you don't want to serialize them for them to be parsed back just after script execution. It also make escaping a lot easier in some use cases: no need to do any escaping, just use plain/1.0 parser and return blocks.

      Here is an example of how to use it in groovy (it actually totally depends of the language and its engine):

      {{groovy}}
      return new org.xwiki.rendering.block.WordBlock("word")
      {{/groovy}}
      

        Attachments

          Activity

            People

            Assignee:
            tmortagne Thomas Mortagne
            Reporter:
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: