You are viewing limited content. For full access, please sign in.

Question

Question

updating rich text using JavaScript

asked on March 24, 2022 • Show version history

Does anyone know how to update the text in a rich text field's value in JavaScript? I have used inspect to try and figure out the path but so far no luck. 

 

for example, these did not work... 

$('.emailFormatted .cf-field > div > div ').val(emailString);
$('.emailFormatted .rich-text-editor').val(emailString);

 

 

 

0 0

Answer

SELECTED ANSWER
replied on March 24, 2022

Try 

$('.emailFormatted .rich-text-editor).prop('innerText', emailString);

4 0
replied on March 24, 2022

I just had to add a missing quote and it worked. thanks!

 

$('.emailFormatted .rich-text-editor').prop('innerText', emailString);

 

1 0
replied on March 24, 2022

Oops :)

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.