<%= javascript_tag "var editor = dojo.widget.Editor2Manager.getCurrentInstance(); editor.execCommand('inserthtml', '#{page_image_tag(@pg, @image_file)}'); cancelInsertImage();" %>