codeslayer1 / react-ckeditor

CKEditor component for React with plugin and custom event listeners support
MIT License
129 stars 34 forks source link

how to upload images #7

Closed lany9527 closed 7 years ago

lany9527 commented 7 years ago

hi, please tell us how to upload images by your component?

codeslayer1 commented 7 years ago

Hi,

Follow these steps -

  1. Add image uploader plugin to your CKEditor build or make a custom build(using builder) with image upload plugin already added. You can find the plugin here https://ckeditor.com/addon/imageuploader
  2. Now place the complete build folder on your webserver so that you can access the folder and the ckeditor.js file using a URL. Let's say the URL for your script is http://dummy.com/ckeditor/ckeditor.js
  3. Now you can simply import this package in your project and pass the custom script url to this component like this. This will load CKEditor from your custom build which will have your image upload plugin. <CKEditor scriptUrl="http://dummy.com/ckeditor/ckeditor.js" />
codeslayer1 commented 7 years ago

Closing this due to no activity.

nguyenkhoi2806 commented 7 years ago

http://dummy.com/ckeditor/ckeditor.js => link die

codeslayer1 commented 7 years ago

That was just an example. The link is not a valid one. I explained you how to use CKEditor with custom build. Hosting your custom build is something you should take care of.

nguyenkhoi2806 commented 7 years ago

https://ckeditor.com/addon/imageuploader this plugin i try to import but it isn't working. Can you explain how to import this plugin to your react-ckeditor-component

codeslayer1 commented 7 years ago

I have already explained the complete process to use this plugin above. Its working perfectly fine for me. Just follow the same steps and it should work for you.

If you have already tried adding it, please attach a screenshot of the error that you are getting and your code.

codeslayer1 commented 7 years ago

Please read the documentation of CKEditor, you have not correctly added the imageuploader plugin in your CKEditor build. Simply installing this library won't help. You will have to create a custom CKEditor build with imageuploader plugin, upload it on your server and then use that build with this library.

Using custom build has been already explained in the docs. Please refer to the CKEditor and this library docs before asking these basic questions.

nguyenkhoi2806 commented 7 years ago

ok thanks

webcoachingtech commented 6 years ago

Oi,

Siga esses passos -

  1. Adicione o plugin de upload de imagem à sua compilação CKEditor ou faça uma compilação personalizada (usando o construtor) com o plugin de upload de imagem já adicionado. Você pode encontrar o plugin aqui https://ckeditor.com/addon/imageuploader
  2. Agora, coloque a pasta de compilação completa em seu servidor da Web para poder acessar a pasta e o arquivo ckeditor.js usando uma URL. Digamos que o URL do seu script seja http://dummy.com/ckeditor/ckeditor.js
  3. Agora você pode simplesmente importar este pacote em seu projeto e passar o URL de script customizado para este componente como este. Isso carregará o CKEditor de sua compilação personalizada, que terá seu plugin de upload de imagem. <CKEditor scriptUrl="http://dummy.com/ckeditor/ckeditor.js" />

Thank's :+1:

gshoanganh commented 4 years ago

https://ckeditor.com/addon/imageuploader this plugin i try to import but it isn't working. Can you explain how to import this plugin to your react-ckeditor-component

you can use this code: <CKEditor scriptUrl="https://cdn.ckeditor.com/4.6.2/full/ckeditor.js" />