Closed raveman closed 6 years ago
Hello, with gem tinymce-rails custom options can be passed to tinymce to override the global options specified in config/tinymce.yml:
view
= tinymce uploadimage_form_url: "/add_image", uploadimage_hint: @post.id
routes.rb
post 'add_image', to: "image#add"
image_controller.rb
class ImageController < ApplicationController
def add
id = params[:hint] # @post.id pass by view
end
end
Simple file uploading is nice, but it could be perfect if there is any ability to send model info with post url to get images uploaded based on models/other attrs, not only in one location.
Right now I see only possibility based on request.referrer, may be it is not a problem.
Thanks.