appleple / appleple/smartblock
Using the image block with standard Javascript
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 318
- Forks
- 26
- Avg merge
- 3m
- Merged PRs (30d)
- 11
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported SmartBlock.Extensions.push and SmartBlock.Editor('#app', ...) calls, then compare this standard-JavaScript setup with the project's extension initialization guidance. Done means the Image extension initializes without the keyed-plugin RangeError and image upload works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100