This project has moved. For the latest updates, please go here.

Set the string that contains the line breaks Multiple lines of text

Feb 4, 2015 at 5:48 AM
I'd like to set a string that contains the line breaks in Multiple lines of text, but was unable to set a string without a new line in the following code.
<script type="text/javascript" src="/sites/testing/SiteAssets/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="/sites/testing/SiteAssets/sputility.min.js"></script>
<script type="text/javascript">

$(document).ready(function() {
    SPUtility.GetSPFieldByInternalName('_x901a__x52e4__x7d4c__x8def__xff3').SetValue("aaaaa");
});
</script>
How do I do to set the string with no line breaks Multiple lines of text?
How do I write a code if you have any new line?
Coordinator
Feb 12, 2015 at 12:15 AM
If you're using multiple lines of PLAIN text, you can use the carriage return and a new line:
SPUtility.GetSPFieldByInternalName('Multi_x002d_line_x0020_Plain_x00').SetValue('aaaaaa\r\nbbbbbbbb');

If you're using multiple lines of RICH text, you can use the line break tag:
SPUtility.GetSPFieldByInternalName('Enhanced_x0020_Rich_x0020_Text').SetValue('aaaaaa<br/>bbbbbbbb');