2016-05-26 11 views
0

ここで使用されているようなWMDエディタを使用します。WMDエディタボタンのカスタマイズはデフォルトからです - wmd-prompt-backgroundを取り除くことはできません

私はカスタムアップロード機能を備えています。これはポップアップを介して行われ、自動的にマークダウンの挿入を処理します。 wmdエディタはそれをまったく処理する必要はありません。

私はdocsの例で説明したようにエディタフックを使用しましたが、デフォルトで表示されるプロンプトの背景を無効/削除する方法はまだ分かりません(同じ背景/オーバーレイが使用されていますここであなたは、などを画像ボタンをクリックしたとき)

これは私のコードです:

// initialize the editor 
    var editor1 = new Markdown.Editor(converter1, "", options); 

    //customize upload button on button bar... remove default functionality, activate popup on click 
    editor1.hooks.set("insertImageDialog", function (callback) { 

     var a = $('#wmd-button-bar').data('stgt'); 
     popup('/inc_upload.asp?t=' + a, 'Upload a File', 350, 500); 

     return true; // tell the editor that we'll take care of getting the image url 
    }); 

editor1.run(); 

答えて

1

は、私はちょうどヌルコールバックを必要と、それを考え出しました。

// initialize the editor 
var editor1 = new Markdown.Editor(converter1, "", options); 

//customize upload button on button bar... remove default functionality, activate popup on click 
editor1.hooks.set("insertImageDialog", function (callback) { 

    var a = $('#wmd-button-bar').data('stgt'); 
    popup('/inc_upload.asp?t=' + a, 'Upload a File', 350, 500); 
    callback(null); 
    return true; // tell the editor that we'll take care of getting the image url 
}); 

editor1.run(); 
関連する問題