Changes for page Writing a Macro

Last modified by Alex Cotiugă on 2024/01/17 17:28

<
From version < 20.1 >
edited by Simon Urli
on 2018/11/19 10:25
To version < 21.1 >
edited by Simon Urli
on 2018/11/23 15:28
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -414,8 +414,6 @@
414 414  
415 415  === Specify the type of the macro content ===
416 416  
417 -
418 -
419 419  You need to specify it in the constructor of the {{code}}DefaultContentDescriptor{{/code}}:
420 420  
421 421  {{code language="java"}}
... ... @@ -439,7 +439,7 @@
439 439  ResourceReference imageReference = // declare the reference to the image logo
440 440  Block logoBlock = new ImageBlock(imageReference, true);
441 441  List<Block> content = this.contentParser.parse(content, context, false, context.isInline()).getChildren(); // parse the existing content and get its children blocks
442 -Block editableContent = new MetadataBlock(content, this.getUnchangedContentMetadata()); // specify the right metadata in order to make the content editable inline
440 +Block editableContent = new MetadataBlock(content, this.getNonGeneratedContentMetadata()); // specify the right metadata in order to make the content editable inline
443 443  return Arrays.asList(logoBlock, editableContent);
444 444  {{/code}}
445 445  
  • Powered by XWiki 14.10.18-node2. Hosted and managed by XWiki SAS

Get Connected