Skip to content

Using the image block with standard Javascript #10

Description

@frapps

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions