Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

DNG RPE Div elements and formatting

 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>
</p>

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. 




0 votes


Accepted answer

Permanent link

 Glyn,


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

Example:

Glyn Costello selected this answer as the correct answer

0 votes

Comments

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

 Example attached to my first answer.


One other answer

Permanent link

 Hello,


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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,033

Question asked: Feb 11 '21, 9:13 a.m.

Question was seen: 1,792 times

Last updated: Jan 31 '23, 5:28 a.m.

Confirmation Cancel Confirm