Module: CapybaraJsHelpers::CkEditorHelper
- Defined in:
- lib/capybara_js_helpers/ck_editor_helper.rb
Instance Method Summary collapse
Instance Method Details
#ckeditor_fill_in(locator, opts) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/capybara_js_helpers/ck_editor_helper.rb', line 3 def ckeditor_fill_in(locator, opts) content = opts.fetch(:with).to_json page.execute_script " $(function() {\n CKEDITOR.instances['\#{locator}'].setData(\#{content});\n $('textarea#\#{locator}').text(\#{content});\n });\n SCRIPT\nend\n" |