Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Copying the html content in the HTML field type to String field

mazin690
Tera Contributor

Hi,

I have scenario, like Copying the Html content in the HTML field type to String field

what ever format that was ter in HTML field..same as to replicate in Plain text(string field) as well.Without changing the format,

any Idea on it. can anybody help me on this.

 

1 REPLY 1

prasannaposetty
Tera Expert

var htmlStr = current.html_field.getDisplayValue(); (Your HTML field value)

var txtStr = htmlStr.replace(/<(?:.|\n)*?>/gm, '');

gs.print(txtStr);