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

Adding a link to an image and text in a table results in unwanted empty lines above and below the image and text

XMLWordPrintable

      Summary

      Adding an image and some text to a table field and then creating a link to the image + text, inserts a blank line before and after the image +text.

      Steps to Reproduce

      1. Create a table, choose one table cell to work with and then do the following steps all in this table cell
      2. Add a picture to the cell
      3. Add text in the next line below the picture
      4. Select both and add a link to them --> The Editor will add empty lines below the text
      5. Remove the empty lines
      6. Go to the preview --> There is now a blank line above the image.
      7. Go back to the editor
      8. Save and reopen the page

      Expected Results

      There are no blank lines either above the image or below the text. HTML should be:

      <tr>
            <td>
              <div class="content-wrapper">
                <p>
                  <a href="http://www.google.com"> <ac:image ac:height="250">
                      <ri:attachment ri:filename="IMG_7260.JPG"/>
                    </ac:image> </a>
                </p>
                <p>
                  <a href="http://www.google.com">text</a>
                </p>
              </div>
            </td>
            <td>
              <br/>
            </td>
            <td>
              <br/>
            </td>
          </tr>
      

      Actual Results

      A blank line is inserted above the image and below the text. HTML is:

       <tr>
            <td>
              <div class="content-wrapper">
                <p>
                  <br/>
                </p>
                <p>
                  <a href="http://www.google.com">
                    <ac:image ac:height="250">
                      <ri:attachment ri:filename="IMG_7260.JPG"/>
                    </ac:image>
                  </a>
                </p>
                <p>
                  <a href="http://www.google.com">text</a>
                </p>
                <p>
                  <br/>
                </p>
              </div>
            </td>
            <td>
              <br/>
            </td>
            <td>
              <br/>
            </td>
          </tr>
      

      Workaround

      Install the Confluence Source Editor and remove the extraneous <p><br></p> from above and below the image + text.

              Unassigned Unassigned
              jbennett@atlassian.com J van Leeuwen
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: