Get Plain Text from Enhanced Rich Text Field
Hi !
Apologies if this has been answered before.
I am attempting to get the plain text from an enhanced rich text field.
Using the fd.field('ERT').value() I can get the field including html formatting as plain text, but is there a way to retrieve just the plain text value of the field ?
For example if the enhanced rich text field stores : <p>something</p>
then I need to set my plain text field to be : something
Thanks in advance for any pointers !
Cheers,
Benjamin
Apologies if this has been answered before.
I am attempting to get the plain text from an enhanced rich text field.
Using the fd.field('ERT').value() I can get the field including html formatting as plain text, but is there a way to retrieve just the plain text value of the field ?
For example if the enhanced rich text field stores : <p>something</p>
then I need to set my plain text field to be : something
Thanks in advance for any pointers !
Cheers,
Benjamin
Hi,
You can use:
But this won't get you a rendering of the html with spacebreaks, etc - just extracted text.
You can use:
Code: Select all
fd.field('...').control()._el().find('div.ms-rtestate-write').text()
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests