Ability to hide macro parameters in WYSIWYG

Last modified by Vincent Massol on 2021/04/06

Thanks to the introduction of a new @ProperyDisplayHidden annotation that can be placed on Macro parameter classes, it's now possible to hide the parameter inside the WYSIWYG's Macro editor. This is useful to hide complex parameters that should only be used in wiki edit mode for example.


public class IncludeMacroParameters
     * @param type the type of the reference
     * @since 3.4M1

    @PropertyDescription("the type of the reference")
   // Marking it as Display Hidden because it's complex and we don't want to confuse our users.
   public void setType(EntityType type)
       this.type = type;

     * @param page the reference of the page to include
     * @since 10.6RC1

    @PropertyDescription("The reference of the page to include")
   // Display hidden because we don't want to confuse our users by proposing two ways to enter the reference to
   // include and ATM we don't have a picker for PageReference types and we do have a picker for EntityReference string
   // one so we choose to keep the other one visible and hide this one. We're keeping the property so that we don't
   // break backward compatibility when using the macro in wiki edit mode.
   public void setPage(String page)
       this.reference = page;
       this.type = EntityType.PAGE;

Get Connected