It's all about the answers!

Ask a question

Assigning primaryText attribute with RTF text

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


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 (8158) | answered Apr 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

Ralph Schoon commented Apr 21, 3:26 p.m.
There is always something wrong if a question has only one line of text. I would advise reading:

Your answer

Register or to post your answer.