It's all about the answers!

Ask a question

Assigning primaryText attribute with RTF text


magnus Elfving (346) | asked Apr 20 '21, 2:10 a.m.
edited Apr 21 '21, 10:12 a.m.

 Hi,

 
Is there any way to "recycle" formatted text (RTF) into the attribute "primaryText" of a Doors NG artifact by OSLC REST API ?

Regards Magnus

Accepted answer


permanent link
Kirk Woods (9168) | answered Apr 21 '21, 12:51 p.m.

I'm not quite sure what you are asking, but let me take a guess (I'm assuming you know OSLC).  The primary text in DNG is stored as HTML.  So you would convert the RTF text to HTML before inserting it into the primary text.  You can use something like the RESTClient plugin in Firefox to test things out first.  I would recommend creating an artifact with empty primary text first so that you can see what it looks like (starts and ends with <div></div>) and then insert your HTML text in between the start and end markups.  You may have to modify the RTF to HTML conversion text based on what is produced by the conversion tool and what is allowed in DNG.

magnus Elfving selected this answer as the correct answer

Comments
Ralph Schoon commented Apr 21 '21, 3:26 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
There is always something wrong if a question has only one line of text. I would advise reading: https://jazz.net/forum/questions/203755/how-should-i-ask-a-question-in-the-forum-if-i-want-to-receive-useful-answers

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.