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.

Image upload doesn't work with redux

See original GitHub issue

Hi

 <ReactSummernote
      value={this.props.currentPost.text}
         options={{
                lang: 'ru-RU',
                   height: 350,
                dialogsInBody: true,
                  toolbar: [
                               ['style', ['style']],
                                 ['font', ['bold', 'underline', 'clear']],
                                 ['fontname', ['fontname']],
                                ['para', ['ul', 'ol', 'paragraph']],
                                 ['table', ['table']],
                                 ['insert', ['link', 'picture', 'video']],
                                 ['view', ['fullscreen', 'codeview']]
                           ]
                   }}
       onChange={this.onChange.bind(this, "text")}
  />

Use the simple example. All text and inserts like tables and lists work good, but imageUpload, I mean base64 uploader doesn’t work at all.

Could you help with this? Thanks

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7

github_iconTop GitHub Comments

6reactions
Dunkatcommented, Nov 9, 2017

There is onImageUpload function, where you can insert image as a base64

<ReactSummernote
      value={this.props.currentPost.text}
         options={{
                   height: 350,
                dialogsInBody: true,
                  toolbar: [
                               ['style', ['style']],
                                 ['font', ['bold', 'underline', 'clear']],
                                 ['fontname', ['fontname']],
                                ['para', ['ul', 'ol', 'paragraph']],
                                 ['table', ['table']],
                                 ['insert', ['link', 'picture', 'video']],
                                 ['view', ['fullscreen', 'codeview']]
                           ]
                   }}
       onChange={this.onChange.bind(this, "text")}
       onImageUpload={this.onImageUpload}
  />

 onImageUpload = (fileList) => {

	const reader = new FileReader();
	reader.onloadend = () => {
		ReactSummernote.insertImage(reader.result);
	}
	reader.readAsDataURL(fileList[0]);

}
0reactions
france05-maxcommented, May 28, 2020

I have a two react-summernote in one component, everytime i upload a image on technicalspecs the image will go the description . someone can help with this error ? btw the description its already good only technical specs .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uploading an image with redux-form
Here are the steps for file-upload feature: (How to handle image data in your API) · Append your redux-form values to the FormData...
Read more >
react-redux and multer for upload | Road to fullstack(MERN)
So, I first created a state for my text input, then for my image itself, then next is the state to hold the...
Read more >
React Redux Tutorial - File & Image Uploading - YouTube
https://www.turbo360.coQuick demonstration showing up to upload images and other static assets via React, Redux and the Turbo CDN ...
Read more >
React.js Image Upload with Preview Display example
You need to configure port for our App. In project folder, create .env file with following content: PORT=8081. So our app will run...
Read more >
Redux breaking image upload on new post (classic editor)
Can you please help me to figure out this issue cause? For that, please try the following: – Open the browser console, try...
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