How to implement auto upload and display photo in the Editor page?

In this Vaadin forum, it is very easy to insert a photo. Just copy and paste, then photo will auto upload and display in the editor page for you. How you can do that ?

Hi!

Not sure if you can do that with the “official”/$$$ RichTextEditor, but with the Tiny MCE addon you can. There is an example in the add-on’s test sources, which supports both drag and drop and clicking on image symbol in the toolbar. Note, that you need to write the image receiving part as well. In the demo that is written with Spring MVC.

  • The editor configurations
  • The server side part accepting (and storing) the images. Replace this with your solution, where you wish to place the images (DB, some other file system location than the Maven’s target dir :-) )

The impelmentation there contains some parts which are probably obsolete for some/most use cases.

3 Likes

Thanks @Matti
Tiny MCE looks nice. I think you cannot do this in $$$ RichTextEditor.
Maybe need a $$$RichTextEditor$$$ :joy:

We are happy to implement that for you, for $$$ of cours :slight_smile:

BTW. regarding $$$, TinyMCE is also $$$ for many cases as well, thus I still haven’t upgraded that add-on to use TinyMCE version 7.

2 Likes