smartblock icon indicating copy to clipboard operation
smartblock copied to clipboard

Using the image block with standard Javascript

Open frapps opened this issue 5 years ago • 0 comments

HI I'm trying to use smart block app with image upload capabilities.

I've tried the following

`

SmartBlock.Extensions.push(new SmartBlock.Image({
    imgClassName: 'img'
}));

SmartBlock.Editor('#app', {
    html: '<h2>Hello World</h2><p>hello</p>',
    extensions: SmartBlock.Extensions,
    onChange: function (result) {
        console.log(result.json, result.html);
    }
});

`

but get the following error.

RangeError: Adding different instances of a keyed plugin (plugin$1)

I can't work out what I'm doing wrong. Sorry, I can't work out the react way of doing it, so stuck with standard js.

frapps avatar Jul 30 '20 15:07 frapps