2012-04-19 7 views
0

CKEditorツールバーにカスタムボタン(プラグイン)を作成しようとすると、一度クリックすると新しいウィンドウでプリセットされたURLが開きます。誰かがこれまでに私のplugin.jsファイル内に持っているものをいくつか助けてくれますか?CKeditor 3.xプラグイン - 新しいリンクを開くカスタムボタンを作成する

私は基本的には、このボタンをクリックすると、新しいウィンドウのURLに移動して、一度言いたいと思います。何か案は?

CKEDITOR.plugins.add('inserthtml', {  
requires: ['dialog'], 
lang : ['en'], 
init:function(a) { 
var b="inserthtml"; 
var c=a.addCommand(b,new CKEDITOR.dialogCommand(b)); 
    c.modes={wysiwyg:1,source:0}; 
    c.canUndo=false; 
a.ui.addButton("inserthtml",{ 
       label:a.lang.inserthtml.title, 
       command:b, 
       icon:this.path+"inserthtml.gif" 
}); 
CKEDITOR.dialog.addIframe(b, b, 'http://pixlr.com/express', 800, 640)} 
}); 

私はこのチュートリアルでは、次のFirebug

CKEDITOR.dialog.addIframe is not a function 
CKEDITOR.dialog.addIframe(b, b, 'http://pixlr.com/express', 800, 640)} 

答えて

1

代わりの無意味な変数名を持つ圧縮ファイルを使用して取得エラー:http://docs.cksource.com/CKEditor_3.x/Tutorials/Timestamp_Pluginをし、お電話でのライン

editor.insertHtml('The current date and time is: <em>' + timestamp.toString() + '</em>'); 

を置き換えますウィンドウを開く:

window.open('http://pixlr.com/express'); 
関連する問題