It's all about the answers!

Ask a question

DNG RPE Div elements and formatting

Glyn Costello (14048) | asked Feb 11 '21, 9:13 a.m.

 Hi, has anyone got any more detailed advice on how to format the output of RPE generated docs using DNG RichText>Div elements as souce?

In some DNG modules, we have imported from a word document, then subsequently modified the text content, but the modification seem to create "span" elements in DNG which end up presenting differently when published. e.g.:

<p dir="ltr"id="_1594296656529">
Here is some text from DNG
<span style="font-family:Arial,Helvetica,sans-serif; font-size:10pt">with an annoyingly formatted bit </span>

There are a couple things I'd like to be able to do:
1: Remove font styles
2: Remove font size 
3: Keep other elements and Align embedded tables and images centred

I've read the link below and whilst it shows how I can 'handle' the Div in a script expression, it's not clear to me how I can go about removing or modifying the Div content. 

Accepted answer

permanent link
Bartosz Chrabski (3.4k22949) | answered Feb 11 '21, 9:27 a.m.
edited Feb 15 '21, 4:13 a.m.


In your case the best solution it is to remove it in RPE report using Regular Expressions.


Glyn Costello selected this answer as the correct answer

Glyn Costello commented Feb 12 '21, 11:56 a.m.

Thank you, any examples of this in the documentation I can follow? 

Bartosz Chrabski commented Feb 15 '21, 4:13 a.m. | edited Feb 15 '21, 4:14 a.m.

 Example attached to my first answer.

One other answer

permanent link
Massimo Maschio (133) | answered Jan 31 '23, 5:27 a.m.
edited Jan 31 '23, 5:28 a.m.


Quick question on this thread: did the answer address ALL the 3 questions:
1: Remove font styles
2: Remove font size 
3: Keep other elements and Align embedded tables and images centered

I'm interested because I'm using the same regular expression, but ALL the elements such as alignments, lists, tables are cleaned up and I'm struggling to find out a solution to have JUST the font - style cleaned up so that I can assign / setup it through the Paragraph Properties in RPE.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.