How do I provide my own link insertion dialog in the pagedown editor?

I use pagedown to edit labels and have already used insertImageDialog to override the default dialog for inserting images. Now I want to do the same to insert a link. I found the plainLinkText hook, but it doesn't seem to do what I want, as it is only for post-processing the url. How can I provide my own dialog to insert a link?

+4
source share
1 answer
 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; }); 
0
source

Source: https://habr.com/ru/post/1480538/


All Articles