Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 15th, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Selecting input element with jQuery in CKEditor
  2. $(this)
  3.  .parents("[role=tabpanel]")
  4.  .prevAll("[name=info]")
  5.  .find("label:contains(URL)")
  6.    .next()
  7.      .find("input")
  8.        
  9. dialog.setValueOf( 'info', 'txtUrl', newValue);
  10.        
  11. // get current dialog
  12. var dialog = CKEDITOR.dialog.getCurrent();
  13. // get the info tab in the dialog
  14. dialog.selectPage('info');
  15. // get the txtUrl element (found id using devtools plugin)
  16. var tUrl = dialog.getContentElement('info', 'txtUrl');
  17. // set this input box to by variable
  18. tUrl.setValue(strLink);