How to use tinymce with images on my website e.g. stackoverflow

I have tinymce embedded in my website, so if users want to edit the content, then you can click the "EDIT" link and display the content in the tinymce editor. when they click "Save", I save the html in the database. this works perfectly and allows them to call me when they need changes to the content, as they can go directly and the next time they reload the main page, download the changed content.

now they want to be able to add their own images. I see that there is some image support in tinymce, as shown here , but in my case the images will be on their computer.

So, I'm looking for some tips on how to handle image support using tinymce on my asp.net mvc website, similar to how stackoverflow allows you to load and include an image in your question in one step.

any suggestions?

+5
source share
4 answers

I had a similar problem and solved it:

Allows the user to upload images, which are then stored in the file system.

Once the image has been saved, you can use tinyMCE to link to it.

, . , - , , , , , .

+2

, :

TinyMce / Asp.net Mvc

// tinyMCE, MVC:)

+5
0

HTML 5 supports inline images. You can embed the image in the html code as a base64 string. Code example:

<img src="data:image/gif;base64,R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQYmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==" alt="Base64 encoded image" width="150" height="150"/>

Open source TinyMCE plugin is available on github:

https://github.com/buddyexpress/bdesk_photo

0
source

All Articles