vue-easy-tinymce icon indicating copy to clipboard operation
vue-easy-tinymce copied to clipboard

Issues with v-if or redraw

Open Einlanzers opened this issue 6 years ago • 3 comments

If you surround the <tinymce> block in a <div> with a v-if condition. The first time the v-if evaluates to "true" everything works, but the second time it no longer renders the TinyMCE editor. Instead it just leaves it as a "textarea". I have got around this by using v-show instead. Another issue arises if you try to re-order or re-structure the object(s) above the TinyMCE editor. In my example I have an array of objects in VueJS. Each of these objects has a TinyMCE editor attached to it. If I re-download the objects via AJAX then it breaks the editor so that it no longer has content and is read-only.

this.objectListing = data.objectListing;
<div v-for="object in objectListing">
    <div v-show="object.isShown">
        <tinymce />
    </div>
</div>

Einlanzers avatar Oct 04 '18 15:10 Einlanzers