New line appearing in RPE DOORS output
Why is a new line appearing between the 'bbb' and the artifact text in the following RPE template being used to export artifacts in a DOORS Next module when no new line appears between the 'aaa' and the 'bbb'?
zoomed in a bit to see the 3rd text cell - it is querying the richtextBody and returning the correct result but publishing with a new line prepended
Normally a new line should only appear if a paragraph element occurs between text elements but here a new line appears between 'bbb' and rich text body:-.
If I change the text cell to instead publish the 'title' attribute then I get the correct output with no new line.
But Title is no use since it is a truncated version of primary text limited to something like 256 chars
If I change the text cell to use Primary Text instead of Title (with the same context as Title) then I get 'data attribute not found'
Primary Text might be a workaround but the rich text would be better.
But if PrimaryText gives 'data attribute not found' then even this workaround is not working.
Accepted answer
You can either use primaryText or div attribute.
primaryText attribute will give stripped down version (without formatting) and you should append ptext=true parameter in the request URL so as to get this attrbute.
The value returned by div attribute will include <div> element, resulting in line break, which is expected.
Comments
Thanks Prasad
I got that working with primaryText using ptext=true
Is there any way to grab the richText from the <div> element and insert a string at the start of the richText so that this string appears at the beginning of the richText with no new line in between the string and the richText?