Remove original message from a SharePoint discussion forum reply via jquery

Someone on the MSDN forum asked how to remove the original message when replying to a thread in a SharePoint discussion forum.
That smelled like a jquery job to me!!Here is the code, as always don’t forget to reference to the correct jQuery file:

<script type="text/javascript">
var d = $(' .ms-rtestate-write');
d.text("");
</script>

What the code does is: get the item with class ms-rtestate-write and clean out the text in it.

About: Marijn

Marijn Somers (MVP) has over 14 years experience in the SharePoint world, starting out with SP2007. Over the years the focus has grown to Office 365, with a focus on collaboration and document management. He is a business consultant at Balestra and Principal Content Provider for "Mijn 365 Coach" that offers dutch employee video training. His main work tracks are around user adoption, training and coaching and governance. He is also not afraid to dig deeper in the technicalities with PowerShell, adaptive cards or custom formatting in lists and libraries. You can listen to him on the biweekly "Office 365 Distilled" podcast.


One thought on “Remove original message from a SharePoint discussion forum reply via jquery”

Leave a Reply

Your email address will not be published. Required fields are marked *