Client action for SanitizeHtml() on mobile

Client action for SanitizeHtml() on mobile

  

Hello,


Does anyone know of a function similiar to SanitizeHtml() from the Sanitization extension that can be used in a client action on a mobile app?


Or any other ideas on how I can nicely display a text string  that contains html tags in an expression on a mobile page, but without the tags? 


(The text comes from the CkEditor component and is saved to an entity in a web page that must then be displayed on the mobile app.)


Thanks!

Solution

Vonnelize Haupt wrote:

Hello,


Does anyone know of a function similiar to SanitizeHtml() from the Sanitization extension that can be used in a client action on a mobile app?


Or any other ideas on how I can nicely display a text string  that contains html tags in an expression on a mobile page, but without the tags? 


(The text comes from the CkEditor component and is saved to an entity in a web page that must then be displayed on the mobile app.)


Thanks!

hi, follow the below steps,


Create a container on your screen where you want to put the content and give it a name.

Then in the ready event handler of the screen (check the screen properties):
1) get the content that you want to display
2) create a JS Node
3) pass the content and the container id to the JS Node
4) write something like this is the JSNode
    document.getElementById($parameters.ContainerId).innerHTML = $parameters.Content

5-done

Regards,

pankaj

Solution

Hi Pankaj


Thank you for the response! It worked like magic. I appreciate the time you took to answer my questions!


Vonnelize