Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-33938

RequiredFormat storage format not working with tables

    XMLWordPrintable

Details

    Description

      If you write a macro and annotate the execute method with the RequiresFormat annotation, you can control the form of the body you receive.

      @RequiresFormat(value = Format.Storage)
      public String execute(Map<String, String> parameters, String body, ConversionContext context) throws MacroExecutionException
        { ... }
      
      • If you use Format.Storage you are meant to get the unprocessed, raw, database format of the page.
      • This mostly works, until there are tables in the body. If there are tables in the body they appear to be transformed (with TableStylingElementTransformer).

      If your body contains:

      <table><th><td></td></th></table>
      

      The macro will receive this as the storage format (which is wrong):

      <table class="confluenceTable"><th class="confluenceTh"><td class="confluenceTd"></td></th></table>
      

      It should receive the storage format.

      Attachments

        Issue Links

          Activity

            People

              mjensen m@ (Inactive)
              mjensen m@ (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: