- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2018 10:03 AM
Does anyone know how to make the Description field in the Ticket Fields widget into HTML? I've seen some posts to use the $sce and bind HTML but not sure how to incorporate that into the widget code.
Thanks,
Aryanos
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2018 12:56 AM
Okay got your point. Its not like the widget is not rendering the description as HTML. Actually in description you are getting \n as new line character while you need <br /> for html. Try to replace all \n with <br /> and it should work fine. Simply replace below line in code.
data.description = gr.description.getHTMLValue().replace(/\n/g,'<br />'); ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2018 11:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2018 12:56 AM
Okay got your point. Its not like the widget is not rendering the description as HTML. Actually in description you are getting \n as new line character while you need <br /> for html. Try to replace all \n with <br /> and it should work fine. Simply replace below line in code.
data.description = gr.description.getHTMLValue().replace(/\n/g,'<br />'); ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2018 07:36 AM
Hi Gurpreet,
Perfect that worked! I apologize in not being clearer with my requirements and thanks for taking the time to help me solve this.
Aryanos