JS-Markdown-Editor
JS-Markdown-Editor copied to clipboard
No url provided
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 });
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.
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.
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.