views:

399

answers:

1

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

+1  A: 
CKEDITOR.instances['instanceName'].insertHTML('&lt; img src="<your image"/&gt;');
Amareswar
I'm using the latest version of CKeditor and get: CKEDITOR.instances.myinstanceName.insertHTML is not a function
Jorre
my fault, the new function is insertHtml (watch caps!). This inserts the html tag as text, is it possible to render the image in the CKEditor as well?
Jorre
fixed that as well... you have to use real html tags, not the < and > symbols. Thanks for your help here!
Jorre