innerHTML support in Ragic

Hi,

Through an API call we get content like this:
<div style=“font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif; font-size:14px”><div>ASolD1</div>.

I want to use innerHTML to get the value out “ASolD1” but innerHTML needs getElementById() and I am not sure how to get that in Ragic. Does Ragic support DOM so that I can do this?

Or do you have another solution we can use?

Thanks

Are you referring to the server-side Javascript? If so, currently DOM parsing is not supported at the server-side. Sorry!

Hi,

Thanks for the feedback and I found a different solution using a simple regular expression as per below.

Snippet
var htmlStr = RS_GetFieldVal(1003569); // own function to get HTML from a field
var text = htmlStr.replace(/<[^>]+>/g, ‘’);

Thanks