Setting the default value for a Rich Text Field in SharePoint Online
To set the default value of a Multiple Lines of Text aka Rich Text Field aka SPFieldNote you can use the following JavaScript:
<script type="text/javascript">
$(document).ready(function () {
var defaultText = "Your html here";
$('nobr:contains("[Your Field Title]")').closest('tr').find('div.ms-rtestate-write').html(defaultText);
});
</script>
<script type="text/javascript">
$(document).ready(function () {
var defaultText = "Your html here";
$('nobr:contains("[Your Field Title]")').closest('tr').find('div.ms-rtestate-write').html(defaultText);
});
</script>
Comments