2010-07-13 38 views
0

我試圖與鏈接對話框中的文本框進行交互(獲取值並設置值)。開始已經有什麼,但它不工作...CKEditor:鏈接對話框中的文本框

CKEDITOR.dialog.add('link', function (a) 
{ 
    var b = function() 
    { 
     var s = this.getDialog(), 
     z = s.getContentElement('info', 'txtUrl'); 
     z.setValue('asdasd'); 
    }); 
}); 

任何想法將是有益的,因爲我敢肯定我幾乎在那裏!

[R

+0

可能的複製http://stackoverflow.com/questions/2777286/ckeditor-dialogs-referencing-input-fields-by-id/5053517#5053517 – 2011-02-19 21:31:33

回答

0

這是最終的解決方案:

var dialog = CKEDITOR.dialog.getCurrent(); dialog.setValueof('info','txtUrl','http://google.com'); return false;

快樂的日子!感謝您的幫助,

[R