I'm using :
I have a textarea called Booking_CancellationComments_CancellationPolicy and am making it a wysihtml5 textarea using this code:
$('#Booking_CancellationComments_CancellationPolicy').wysihtml5(options);
I'm trying to update it later using:
$('#Booking_CancellationComments_CancellationPolicy').val(data.Booking.CancellationComments.CancellationPolicy);
But the textarea isn't updating. I've looked at lots of answers on Stack Overflow and not show how to update the textarea using the initialisation method I've used.
Any help appreciated.
Try this:
$('#Booking_CancellationComments_CancellationPolicy').data("wysihtml5").editor.setValue(data.Booking.CancellationComments.CancellationPolicy);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With