gpt4 book ai didi

javascript - 自定义 WMD 编辑器按钮的默认值 - 无法摆脱 wmd-prompt-background

转载 作者:行者123 更新时间:2023-12-03 06:52:06 27 4
gpt4 key购买 nike

我使用 WMD 编辑器,就像这里使用的那样。

我有一个通过弹出窗口完成的自定义上传功能,并自动处理标记的插入,例如wmd 编辑器根本不需要处理这个问题。

我已经使用了编辑器 Hook ,如 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();

最佳答案

明白了,我只需要一个空回调。

// 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();

关于javascript - 自定义 WMD 编辑器按钮的默认值 - 无法摆脱 wmd-prompt-background,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37449505/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com