Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

upload a image and insert directly into CKEditor

I'd like to create the same kind of function tumblr has for uploading images and then inserting them directly into the WYSIWYG editor.

I was planning on using uploadify to upload the image, then I am not sure of the method for inserting into the CKEditor.

Has anyone done anything similar or know of a plugin that could do this? Ideally I'd like it to insert the image wherever the text cursor was last placed.

Upload an image and directly insert it into a text area http://www.freeimagehosting.net/uploads/06217dcebb.png

Thanks in advance,

Tim

like image 252
Timmeh Avatar asked Apr 16 '10 10:04

Timmeh


People also ask

How do I import an image into CKEditor?

To upload a new image open the upload panel in the image browser. Open the Image info tab and click Browse server. A new window will open where you see all your uploaded images. Open the Settings to choose another upload path.

How do I use CKFinder in CKEditor?

Using CKFinder.setupCKEditor() method to insert a CKEditor 4 instance with CKFinder 2 integrated. This method takes the CKEditor instance which will be set up as the first argument ( editor ). If no argument is passed or the editor argument is null, CKFinder will integrate with all CKEditor instances.


1 Answers

CKEDITOR.instances['instanceName'].insertHtml('<img src="your image">');
like image 80
Amareswar Avatar answered Sep 28 '22 01:09

Amareswar