Recently doing an exam system project. Where the entity answer has this demand, the answer a,b,c,d in the form of text and picture mashup, and the text is rich text.
That's probably how it's stored in the database.
Don't say much nonsense start on dry goods ....
First, import the file on the JSP page
Second, proceed, summernote initialization, here I initialize a lot of
---------------------------------------------------
:
Third, summernote the default image upload is to directly base64 the image encoding, and then placed in the IMG tag data (not very clear, presumably this) attribute, Base64 encoded after the generated data is very large, although it can be successfully uploaded, but if added to the database, There is no doubt that it accounts for memory. Our ideal scenario is that only the image path is stored in the database. So let's start with the transformation. That is, rewrite the summernote image upload method.
Four, the last part of the background, this online search can have a lot, whatever upload method you can use. I use the spring MVC upload method.
First remember to configure the configuration file in the
Then the controller:
Well, by this step the basic functionality can be achieved. Small partners can be more complete, such as the deletion of functions, etc.
Summernote + Spring MVC + Ajax Uploading pictures < notes >