I have a multi line rich text field and I want to get the data from column and set in text area line by line.

I tried Splitting but I need another solution if possible.

  • Please add more details to your question. post the code you tried here if possible. Jun 18, 2019 at 5:53

2 Answers 2


You can do this easily by using p tag, i was also stucked on the same problem:
HTML part: <p id="location_of_work"></p>
Code: $('#location_of_work').text(form1.location_of_work);
here form1 is my array from where i am getting values
location_of_work: column name

  • when we fetch the data <br> tag also comes.So in array we have to do splitting? Jun 19, 2019 at 7:07
  • You don't need to add <br> only define width, when it will reach end of width, data will shift to another line Jun 20, 2019 at 11:04

We can use REST API to get the multiple line of text field data, then set the text to textarea using jQuery. The following example code for your reference.

<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript" language="javascript">
    var listTitle="CustomList";
    var fieldName="MultipleText";
        url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + listTitle + "')/items",
        type: "GET",               
        headers: {
            "Accept": "application/json;odata=verbose",
        success: function (data) {
            var text="";
        error: function (data) {
<textarea id="message" rows="6" cols="80">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.