jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.41k stars 1.16k forks source link

How to show the image in text area #553

Open lemonxxy opened 6 years ago

lemonxxy commented 6 years ago

I have already upload the image ,but it can`t show in the text area, link this , image

xhr.addEventListener('load', () => { const response = JSON.parse(xhr.responseText); resolve( { data: { link: response.data[0].origin}}); }) So , what can I do to let the image show in the text area???

lemonxxy commented 6 years ago

I have solved this problem.But there this another question , how to dynamic initial the state ???

lemonxxy commented 6 years ago

I have solved too ~

WangY16 commented 6 years ago

I also have the same problem. Can you tell me how you solved it?

zoloin commented 6 years ago

Can you tell me how you solved it?

jpuri commented 6 years ago

img_upload

It does works on demo pages: https://jpuri.github.io/react-draft-wysiwyg/#/ You can also refer the storybook: https://github.com/jpuri/react-draft-wysiwyg/tree/master/stories/ImageUpload