spec/support/tiny_mce.rb
# A method to find and fill in fields for TinyMCE form elements.
A method to find and fill in fields for TinyMCE form elements.
A method to find and fill in fields for TinyMCE form elements .
def tinymce_fill_in(id, val)
    page.evaluate_script("tinyMCE.get('#{id}') !== null")
    js = "tinyMCE.get('#{id}').setContent('#{val}')"
    page.execute_script(js)
    js = "tinyMCE.get('#{id}').fire('change')"
    page.execute_script(js)
  end
def tinymce_fill_in ( id , val ) page . evaluate_script ( "tinyMCE.get('#{id}') !== null" ) js = "tinyMCE.get('#{id}').setContent('#{val}')" page . execute_script ( js ) js = "tinyMCE.get('#{id}').fire('change')" page . execute_script ( js ) end
A method to find and fill in fields for TinyMCE form elements.
A method to find and fill in fields for TinyMCE form elements .
# use 'sleep until' if you need wait until the TinyMCE editor instance is ready. This is required for cases # where the editor is loaded via XHR. # sleep 0.5 until # Trigger the change event
id
<not_specific>
val
<not_specific>