Bootstrap and wysihtml5 updating textarea -
i'm using :
- wysihtml5
- bootstrap-wysihtml5.js
i have textarea called booking_cancellationcomments_cancellationpolicy , making wysihtml5 textarea using code:
$('#booking_cancellationcomments_cancellationpolicy').wysihtml5(options);
i'm trying update later using:
$('#booking_cancellationcomments_cancellationpolicy').val(data.booking.cancellationcomments.cancellationpolicy);
but textarea isn't updating. i've looked @ lots of answers on stack overflow , not show how update textarea using initialisation method i've used.
any appreciated.
try this:
$('#booking_cancellationcomments_cancellationpolicy').data("wysihtml5").editor.setvalue(data.booking.cancellationcomments.cancellationpolicy);
Comments
Post a Comment