简体   繁体   中英

using Ckeditor or tiny mce to upload image with html in asp.net

I want to WYSIWYG editor like tiny mce or ck editor to add product description, the issue is , the user can add images using built in image uploader available in the editor within the html. Within the database i have 4 fields , producttitle, productdescription ,productimage. I am out of ideas of how will i save the images in the productimage field/ if i dont use that field how the editor will save images including the html in the productdescription field. Any suggestions or assistance will be appreciated.

Thanks

That depends on your website structure. Generally we need a separate upload field and then we store the path in database. With that way you can retrieve producttitle and productimage in order to list your products. Also with that way you keep all your product pages structure the same. I explain, let's say you have your product image on the left and the description on the right. If you want anytime to change this structure you modify one file, otherwise you will need to modify each product description field.

However it's necessary to have also an uploader on your WYSIWYG editor. You maybe need it once to add extra images or some icons. In addition, it's nice to make things easier, not only for you, but for the client. In general clients like things that they are already used (MS Office) like a complete WYSIWYG.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM