xwikisas / application-diagram

Create various types of diagrams using draw.io
GNU Lesser General Public License v2.1
0 stars 8 forks source link

Partial styled elements are displayed on different rows in XWiki PDF Export if there is text separated by "Enter" in paragraph #152

Open oanalavinia opened 4 years ago

oanalavinia commented 4 years ago

Steps to reproduce:

  1. Create a new Diagram
  2. Add a Text shape
  3. Add some text on different rows separated by enter
  4. Add style (e.g.: bolded text) to just a part of a row example_bold
  5. Click Save & View
  6. Access More actions > Export > Export as PDF

Expected results:

The PDF looks like the diagram.

Actual results:

A break is inserted between the styled text and the simple one, arranging them on different rows

From: 1

To: 2

Tested with Diagram Application 1.13.2, XWiki 11.10.4

oanalavinia commented 4 years ago

Note / Workaround: The issue is not reproducing if the Text box is inserted instead of Text element, but a fallback is provided and the styling of the element is removed

Investigation: this issue is related to the fix added by #118 and is explained here https://github.com/xwikisas/application-diagram/blob/master/application-diagram-ui/src/main/resources/Diagram/DiagramEditSheet.xml#L727