I have a multiline rich text SharePoint list column but when it is processed into a word document it shows as plain text with the html tags. I tried using the rich text box in the word template but it doesn’t work.
JSON data element is:
"Highlight": "<p><strong>Edited by NewsCenter</strong> Admiral <a target=\"_blank\" rel=\"noreferrer\" href=\"https://www.voanews.com/a/us-closely-watching-iranian-exercises-in-persian-gulf/4511456.html\">John Richardson</a>, the U.S. chief of naval operations, confirmed to Pentagon correspondent Carla Babb last week that the U.S. Navy is closely watching Iranian naval exercises in the Persian Gulf. The admiral, who is outranked only by the chairman and vice-chairman of the Joint Chiefs of Staff, made the remark as Reuters and CNN were basing reports about the exercises on unidentified sources. In the same face-to-face interview, Richardson talked broadly about U.S. naval strategy vis-à-vis Iran, <a target=\"_blank\" rel=\"noreferrer\" href=\"https://www.voanews.com/a/admiral-to-voa-us-consistency-counters-chinese-aggression-in-south-china-sea/4515358.html\">Chinese activity in the South China Sea</a>, and a <a target=\"_blank\" rel=\"noreferrer\" href=\"https://www.voanews.com/a/us-navys-top-admiral-cites-increased-threat-in-ocean-nearest-washington/4515353.html\">Russian submarine threat in the Atlantic</a>, generating a total of three stories. The Russian story, published Tuesday morning, was the top item in the Pentagon’s “Early Bird” daily news summary.   </p>"
Thanks, @Oleg_Tsurkan. Do you know if Plumsail has plans to include similar functionality in the create docx from template action? This will be helpful especially since it’s a column type supported by SharePoint.
I’m afraid there are no plans for that. The thing is that the data you get from SP Get item action, for example, already contains HTML tags and Create DOCX from Template can only recognize strings or integers as an input data.
Thank you for your request. Regarding the first option that you suggested. There is an action in Microsoft Flow called “HTML to text”, It is a part of “Content conversion” connector. Review this article for more information. You can use it to translate HTML to plain text before passing it to our actions.
translating the HTML to plain text defeats the purpose of SharePoint supporting Rich Text. Microsoft PowerApps also recently started supporting Rich Textbox controls. This means more and more we will have the need to have rich text on documents, especially on Word.
Other document generation tools support this feature, however, they are not as easy to use as Plumsail, so I strongly encourage Plumsail to consider supporting this.
Anton’s solution works for me, for now, but it would be excellent to retain the HTML and render it into Word as html/rtf (whatever Word uses under the hood).
We use the DOCX converter and like to insert a rich text column. For us it would be nice if there is a way to show the text in the DOCX file with basic formatting from the rich text, so that selected HTML-tags (e.g. b-Tag to bold or ul-Tag to bullet list) will be converted and inserted as formatted text in the DOCX file. Do you see any possiblity to do this?
Today we remove all HTML tags from the rich text before converting to DOCX file.