chmln / vue-wysiwyg

A lightweight WYSIWYG HTML editor for Vue.js
https://chmln.github.io/vue-wysiwyg/
MIT License
555 stars 134 forks source link

does it support auto save? #74

Closed fengchangfight closed 5 years ago

mchampaneri commented 5 years ago

You can do it using watch on content using vuejs watch property. It will work like autosave on change For example

watch:{
 content: function(){
   // api calls to save the current data //
  } 
}
weblabio commented 5 years ago

<wysiwyg v-model="myHTML" v-on:change="onChange"/> methods: { onChange: function(content) { //your logic } }

fengchangfight commented 5 years ago

I've figured out a way to do the auto save, basically just use the content change event, but find a way for debounce(could be in many ways). thank you all for answering, I'll just close the issue now..