Sha256: fe5d5bb1f7295d14fd20c192da51c288bf70e6af4a1ca8892a42cc1afa994813
Contents?: true
Size: 1.48 KB
Versions: 6
Compression:
Stored size: 1.48 KB
Contents
module TinymceHelper # Pass paths into the tiny mce image, link and file dialog via hidden fields # options: # tiny_mce_files_width: width of file dialog. Default is 675 # tiny_mce_files_height: height of file dialog. Default is 540 # tiny_mce_images_width: width of image dialog. Default is 675 # tiny_mce_images_height height of image dialog. Default is 540 def mce_fields(parent, options = {}) parent_params = make_muck_parent_fields(parent) || {} tiny_mce_files_path = tiny_mce_files_url(parent_params) tiny_mce_images_path = tiny_mce_images_url(parent_params) tiny_mce_links_path = tiny_mce_links_url(parent_params) %Q{<input id="tiny_mce_files_path" type="hidden" value="#{tiny_mce_files_path}"> <input id="tiny_mce_files_width" type="hidden" value="#{options[:tiny_mce_files_width] || 675}"> <input id="tiny_mce_files_height" type="hidden" value="#{options[:tiny_mce_files_height] || 540}"> <input id="tiny_mce_images_path" type="hidden" value="#{tiny_mce_images_path}"> <input id="tiny_mce_images_width" type="hidden" value="#{options[:tiny_mce_images_width] || 675}"> <input id="tiny_mce_images_height" type="hidden" value="#{options[:tiny_mce_images_height] || 560}"> <input id="tiny_mce_links_path" type="hidden" value="#{tiny_mce_links_path}">} end def tiny_mce_upload_form(parent) upload_form(parent, true, '', :upload_url =>new_upload_path_with_session_information(parent, 'json')) end end
Version data entries
6 entries across 6 versions & 1 rubygems