question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

draft-js-image-plugin, there is NO imagePlugin.addImage method

See original GitHub issue

http://joxi.net/KAgGKbwC4ZpW1A

https://www.draft-js-plugins.com/plugin/image


const imagePlugin = createImagePlugin();

....

render() {
    return (
      <div>
        <div className={editorStyles.editor} onClick={this.focus}>
          <Editor
            editorState={this.state.editorState}
            onChange={this.onChange}
            plugins={plugins}
            ref={(element) => { this.editor = element; }}
          />
        </div>
        <ImageAdd
          editorState={this.state.editorState}
          onChange={this.onChange}
          modifier={imagePlugin.addImage}
        />
      </div>
    );
  }
}

modifier={imagePlugin.addImage} but there is no such method!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
artskarcommented, Oct 31, 2017

@nikgraf release this plugins please, i spend several days to get understand why plugins don’t work like in docs. >.<

0reactions
freedomlangcommented, Apr 19, 2018

@artskar The draft-js-image-plugin has been released months, the imagePlugin.addImage method should be available in the lastest version. If you still have this problem, please a comment or open a new issue, we will pick it from there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding image draft-js-image-plugin - Stack Overflow
If I set the initial state with the image already embedded it renders. However, when using a mechanism that adds it later on...
Read more >
Image - DraftJS Plugins - High quality plugins with great UX
You can have images in your text field. This is a very rudimentary example, but you can enhance the image plugin with resizing,...
Read more >
111-draft-js-image-plugin - npm package - Snyk
Based on project statistics from the GitHub repository for the npm package 111-draft-js-image-plugin, we found that it has been starred 4,017 ...
Read more >
[Solved]-How to insert an image using draft.js?-Reactjs
The latest versions of draft-js-image-plugin has an error, so you can use 2.0.1 version. I'm using the latest draft-js version "draft-js": "0.10.5", , ......
Read more >
draft-js-image-plugin examples - CodeSandbox
Learn how to use draft-js-image-plugin by viewing and forking draft-js-image-plugin example apps on CodeSandbox.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found