Timmeh Timmeh - 4 months ago 17
jQuery Question

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

Thanks in advance,

Tim

Answer
CKEDITOR.instances['instanceName'].insertHtml('<img src="your image">');