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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -