I am getting text field data in Draft.js Raw Content State. | Community
Skip to main content
Level 2
April 16, 2025
Solved

I am getting text field data in Draft.js Raw Content State.

  • April 16, 2025
  • 1 reply
  • 507 views

Hi,

I am using a custom "Text with Formatting" field and sending this field's data in a email notification to user however I am getting the data in below format rather than the simple text. I guess its the Draft.js Raw Content State.

 

{"blocks":[{"key":"kami","text": "Observations & Recommendations","type":"unstyled","depth":0,"inlineStyleRanges":[],"entityRanges":[],"data":{}}],"entityMap":{}}

 

Does anyone have any idea how to get this field's data into simple text form?

 

Any help or suggestion would be appreciated. TIA!!

Best answer by _Manish_Singh

Hi @himanshu4 - You can parse the JSON string using the Parse JSON module and then extract the text in the next step using the following:

get(map(mapblockhere[];text);1)

1 reply

_Manish_Singh
_Manish_SinghAccepted solution
Level 9
April 16, 2025

Hi @himanshu4 - You can parse the JSON string using the Parse JSON module and then extract the text in the next step using the following:

get(map(mapblockhere[];text);1)
Himanshu4Author
Level 2
April 16, 2025

Thank you@_manish_singh 

_Manish_Singh
Level 9
April 16, 2025

If there are multiple texts, you can use:

join(map(mapblockhere[];text);"")