JS-Markdown-Editor icon indicating copy to clipboard operation
JS-Markdown-Editor copied to clipboard

No url provided

Open jokohoko opened this issue 3 years ago • 2 comments

Greetings. Thanks for the awesome editor!

But i have one issue. I do not have an image uploader backend so i wanted to disable this option. But when i do so i receive an error "no url provided" and the editor does not work properly. Preview is not updated for example. I used the provided settings example: var md = new MdEditor('#mdeditor', { uploader: false, preview: true }); image

When i do use a url or random string as the uploader value the editor does work as intended. Only the image upload option fails.

Am i missing something? My hope was that the image button would work like the url button and just provides the correct brackets in the editor.

jokohoko avatar Aug 27 '21 15:08 jokohoko

Hi,

No you are not missing anything the editor does not handle not having an uploader. You can do a PR if you want to handle this case I will merge it.

Grafikart avatar Aug 27 '21 18:08 Grafikart

Then is the sample options provided on the readme not wrong? is shows:

var md = new MdEditor('#mdeditor', { uploader: false, preview: true });

uploader: false, false to disable the image uploader (using drag'n drop) or a string containing the REST api endpoint

So I assume the false option would be an option.

Will see if i can do the changes. For now i use it with a dummy url.

jokohoko avatar Aug 28 '21 12:08 jokohoko