PerfectlyNormal / tinymce-rails-imageupload

Image upload plugin for TinyMCE and Rails with the asset pipeline
MIT License
149 stars 153 forks source link

Extra functionality #55

Closed stasou closed 8 years ago

stasou commented 10 years ago

I hacked around it and added functionality to also support other file types. In case it's image, it adds the image, otherwise it adds a link to the upload.

The hack consists in: a. adding an extra json variable (isimage) which is 'true' if file type match(/image/). b.if isimage=='true' as is else, create an tag instead of a c.change the icon for the toolbar and some mesages

It is a very well formed plugin, thanks for having written it.

sobrinho commented 8 years ago

Thanks! Feel free to open a pull request if this is still relevant to you.