You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I trigger an update on v-html when the v-model (text area) is updated from a script?
In my case, the textarea (with v-model) is populated from an ajax callback successfully, but the v-html doesn't update until I type in the textarea.
After reading issue #372, I hoped triggering a change event on the textarea would refresh the v-html -- but no success.
After getting some lunch, I realized I was taking the wrong approach.
I changed my code to update the $data.input, which then updated both the v-model and v-html.
First, I assigned the Vue object to a variable in order to target.
<script>
var $vm = new Vue({el: '#editor',filters: {marked: marked}})
// pseudo-code:
function myAjaxCallback(myajaxdata) {$vm.$data.input=myajaxdata[0].myfield;}</script>
How can I trigger an update on v-html when the v-model (text area) is updated from a script?
In my case, the textarea (with v-model) is populated from an ajax callback successfully, but the v-html doesn't update until I type in the textarea.
After reading issue #372, I hoped triggering a change event on the textarea would refresh the v-html -- but no success.
The text was updated successfully, but these errors were encountered: