ankurk91 / vue-trumbowyg

Vue.js component for Trumbowyg WYSIWYG editor :memo:
https://ankurk91.github.io/vue-trumbowyg/
MIT License
236 stars 35 forks source link

Base64 plugin not rendering image #18

Closed netgfx closed 6 years ago

netgfx commented 6 years ago

I'm submitting a ... (check one with "x")

[ x] Bug report
[ ] Feature request
[ ] Other, please describe

Tell about your platform

Current behavior Have added the base64 plugin (item exists on the toolbar and working), but the image is not added without any errors on the console.

Expected behavior An image to appear on the text area.

Minimal reproduction of the problem with instructions

html <trumbowyg v-model="content" v-bind:config="config" class="form-control col-12" name="content"></trumbowyg>

js


import 'trumbowyg/dist/ui/trumbowyg.min.css';
import Trumbowyg from 'vue-trumbowyg';
import '../../../../node_modules/trumbowyg/dist/plugins/base64/trumbowyg.base64.min.js';

Vue.component("trumbowyg", Trumbowyg);

app = new Vue({
                el: wrapperComponent,
                data: {
                    config: {
                        autogrow: true,
                        btnsDef: {
                            // Create a new dropdown
                            image: {
                                dropdown: ['insertImage', 'base64'],
                                ico: 'insertImage'
                            }
                        },
                        // Redefine the button pane
                        btns: [
                            ['viewHTML'],
                            ['formatting'],
                            ['strong', 'em', 'del'],
                            ['superscript', 'subscript'],
                            ['link'],
                            ['image'], // Our fresh created dropdown
                            ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
                            ['unorderedList', 'orderedList'],
                            ['horizontalRule'],
                            ['removeformat']
                        ]
                    },
                    content: null
                }
});
netgfx commented 6 years ago

See an example of the issue here: https://codepen.io/7linternational/pen/dQoazW

ankurk91 commented 6 years ago

This is an issue with parent library Trumbowyg itself It was working fine till v2.9.4

https://jsfiddle.net/py8y56jo/14/

You should report this issue there.

netgfx commented 6 years ago

Just to confirm that the JSFiddle posted doesn't work as well.

ankurk91 commented 6 years ago

Thats what i said mate. The jsfiddle was posted for you so that you can test it without vue.js.