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

    • Unit
    • Unknown

    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

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

            Dates

              Created:
              Updated:
              Resolved: