none
Get value from Rich Text Editor RRS feed

  • Question

  • Hello,


    Previously my code (below) is working,

    var txtEmbedCode = j(":input[id='ctl00_ctl47_g_067d8f40_1404_452e_ae86_ece99954b934_ff111_ctl00_ctl00_TextField_inplacerte']").val();

    Suddenly, its not working.

    Any solution to get value from Rich Text Editor field?


    Thank You.

    Friday, March 24, 2017 12:22 PM

All replies

  • Hi,

    Please use your Developer Tools in IE or Chrome browser to get the error in the console category. Is there any changes to the column ? May be deleted an recreated ?


    Please remember to click Mark as Answer on the answer if it helps you

    Friday, March 24, 2017 12:42 PM
  • Hi Ameenah,

    You should use -$('input[title="TitleOfYourElement"]').val();


    K Mohit

    Friday, March 24, 2017 12:42 PM
  • There is no changes.

    Previously, i'm using below code. Refer this page Get Value from Rich Text Editor field

    ($(".ms-rtestate-write[id^='Embed_x0020_Code']")[0].innerHTML=="<p>​</p>")

    but now the id change to (below image). What id should i take?

     Thank You.

    Friday, March 24, 2017 12:55 PM
  • This code is not working for me.

    Thank You.

    Friday, March 24, 2017 12:57 PM
  • It is working-

    ($(".ms-rtestate-write[id^='Embed_x0020_Code']")[0].innerHTML=="<p>​</p>")

    and replace the Embed_x0020_Code with the internal name of your rich text field.



    K Mohit

    Saturday, March 25, 2017 8:57 AM
  • Hi,

    We can use the following code to get the value from Rich Text Field. 'RichText' is my field name, please change it to yourself.

    <script src="//code.jquery.com/jquery-3.1.0.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {	 
    	var richTextValue=$(".ms-standardheader nobr:contains('RichText')").closest("tr").find("input[id$='TextField_spSave']").val();
    	alert(richTextValue);
    });
    </script>

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Sunday, March 26, 2017 2:18 AM
    Moderator
  • Hi Ameenah,

    Any update?

    If the replies help you, please mark the reply as answer, it will make others who stuck with the similar issue easier to search for valid solutions in this forum.

    Best regards,
    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, March 27, 2017 8:56 AM
    Moderator
  • sorry late response. I got undefined.

    May i know which part i should change?

    var richTextValue=$(".ms-standardheader nobr:contains('RichText')").closest("tr").find("input[id$='TextField_spSave']").val();
    	alert(richTextValue);

    Thank You.

    Tuesday, June 6, 2017 10:11 AM
  • Hi,

    The "RichText" is my test field, please change it to yourself.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, June 7, 2017 1:13 AM
    Moderator
  • Hi,

    I got  <p></p> even i inserted value in rich text field.

    Thank You

    Wednesday, June 21, 2017 7:50 AM
  • Hi,

    Can you provide the HTML code(Using IE F12 developer tools to get it) about this rich text field?

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, June 21, 2017 9:11 AM
    Moderator