6
votes

I am looking at ways to Paste an Image into TinyMCE editor, I have been googling it for a while, but couldn't find any related answer.

I can append an <img> with src content to the Editor(when i paste the image on the page other than inside the editor).

I am not able to paste it inside the Editor. I am using Javascript and jquery. Has anyone got an idea, how i could do this.

2
AFAIK you can just copy an image from a web site and paste it in TinyMCE. You talking about c&p from desktop?specialscope
Yes, i am copying an image from desktop and trying to paste it.Bramha
That is quite tricky. So far I think only google docs have that technology that too just for chrome.specialscope

2 Answers

2
votes

Enable paste_data_images

Setting paste_data_images to "true" will allow the pasted images, while setting it to "false" will disallow pasted images.

1
votes

You can't do that. TinyMCE and any other editor out there are giving you the functionality of creating rich text content. Displaying an image requires an URL and there is no URL to the image on your machine.

You need to upload the image to a server. You need to be able to access that image through a link. That link is what you insert into TinyMCE.