Vue Wysiwyg Editor is simple Html Editor with support for tags.
npm install vue-wysiwyg-editor
yarn add vue-wysiwyg-editor
import VueWysiwygEditor from 'vue-wysiwyg-editor';
components: {
HtmlEditor
}
<vue-wysiwyg-editor
:tags="{0: '#name_of_tag_one', 1: '#name_of_tag_two', 2: '#name_of_tag_three'}"
:text="name_of_your_vmodel"
:text.sync="name_of_your_vmodel"
></vue-wysiwyg-editor>
If you need callback for save text in editor use debounce.
<vue-wysiwyg-editor
:tags="{0: '#name_of_tag_one', 1: '#name_of_tag_two', 2: '#name_of_tag_three'}"
:text="name_of_your_vmodel"
:text.sync="name_of_your_vmodel"
v-on:debounce-input="debounceInputTextArea"
></vue-wysiwyg-editor>
methods: {
/*
* Quando para de digitar um textarea
*/
debounceInputTextArea: _.debounce(function (e)
{
// call your function where
}, 500),
}