CKEditor5 using a second backhaul data acquisition, image upload

1, when there is editing system, you need the data in the database is echoed to the page, so the use of the most general way, by hiding the input label storage, through setData method CkEditor5 will assign data to a rich text box in

<textarea id="pc" name="pc" th:value="${pdSo.pc}" style="display: none;"></textarea>
<input id="pc1" name="pc1" th:value="${pdSo.pc}" class="form-control" type="text" style="display: none;">

2, to achieve CKEditor5 image upload

By ckfinder property of CKEditor, define your own upload request address, the Internet, said there are three ways to upload, I just realized a

Back to the front desk to receive parameters by MultipartFile, but the parameter name for the upload, capture can be seen on the page, where particular attention

 

 

 After successful request to return json string to include uploaded, url two properties, using the map way back to the page can, url address for the storage

 

Guess you like

Origin www.cnblogs.com/heguxin/p/11417402.html