Rovak / InlineAttachment

Easily paste and upload files/images in plain textareas
http://git.razko.nl/InlineAttachment
MIT License
618 stars 77 forks source link

Support TinyMCE #52

Open Misiu opened 9 years ago

Misiu commented 9 years ago

First I want to say this is an awesome plugin, I hadn't test it yet, but from demo I can see this is THE functionality I was looking for. Thank You for sharing this awesome piece of code. I noticed that You have CodeMirror integration, do You plan to add tinyMCE support? right now when placing images into TinyMCE they are included as base64, instead I would like to include them like You plugin is doing.

Maybe You already used Your plugin with TinyMCE?

Rovak commented 9 years ago

Good one, gonna look into it this weekend!

Misiu commented 9 years ago

@Rovak awesome news :) Hope this won't be to complex to implement.

Rovak commented 9 years ago

I've been doing some tests and implementing simple behavior is easy. I think the exceptions are gonna be harder to implement in the editor because the pasted data can contain more complex situations:

  1. Content with multiple images
  2. Content with images which are already uploaded, they should not be uploaded again.
  3. Broken Image links
  4. External image links

I will try to implement the simple behavior first. After that i will consider implementing the more complex situations.

Misiu commented 9 years ago

@Rovak, awesome news :)

  1. Multiple images should be processed one by one, I tried adding text (with images) from Word document into GitHub and images are not pasted, just text
  2. I think this might be addressed by server side. When uploading PHP could count checksum from image and store filename and checksum on server (simple database) then when someone will try to upload same image (even with different filename) we could check if we have checksum in database and return image link for that checksum. Maybe a simple idea, but this could save space on server for duplicates. 3 & 4 I don't know how TinyMCE is doing that, but if we paste link to external image it should stay as is, or maybe we could try to fetch that on server side and return link to our local image? In case of any errors we could return default error image.

What do You think?

Misiu commented 9 years ago

@Rovak any news on this?

Rovak commented 9 years ago

not yet, been busy with other things and this one isn't very high on my priority list right now

Misiu commented 8 years ago

Hi Rovak, any chances You might look into this issue?

Rovak commented 8 years ago

Hi Misiu, like i mentioned before, this issue is not very high on my priority list, this plugin is focused on inputs which are not WYSIWYG based like textarea's and markdown syntax. TinyMCE already has a way to embed images so i doubt that this plugin will be used much in combination with TinyMCE.