[英]How do I provide my own insert link dialog in pagedown editor?
I use pagedown for markdown editing and already used the insertImageDialog
for overriding the default dialog for inserting images. 我使用pagedown进行降价编辑,并已使用insertImageDialog
覆盖插入图像的默认对话框。 Now I want to do the same for insert a link. 现在我想做同样的插入链接。 I found the plainLinkText
hook, but it does not seem to do, what I want, since it is only for post processing the url. 我找到了plainLinkText
钩子,但它似乎没有,我想要什么,因为它只用于后处理url。 How can I provide my own dialog for inserting a link? 如何提供自己的对话框来插入链接?
var editor = new Markdown.Editor(converter, '', options);
editor.hooks.set("insertImageDialog", function (callback) {
//show your dialog
//example:
//showPrompt({
// message: 'Input an url',
// onOK: function(url){ callback(url); }
//});
return true;
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.