tylingsoft / markdown-plus

Markdown editor with extra features.
http://mdp.tylingsoft.com/
2.12k stars 395 forks source link

2 issues with the editor #84

Closed nikocraft closed 7 years ago

nikocraft commented 7 years ago

This is great editor and I really want to use it in my project however I have found few problems with the editor I hope to get some answers or suggestions what I could do about it.

First issue I need to modify the editor and instead of markdown-plus.min.js I tried loading markdown-plus.js but that does not work since these 2 files are totaly different, min.js is around 3 mb big and .js version is 14 kb only and importing markdown-plus.js gives errors in the console.

What is all extra stuff in min.js version? I unminified it and there is lots of weird stuff in there that did not make sense to me.

How can I edit this editor to suit my needs?

Second issue I tried customizing the preferences popup windows and removing custom CSS, custom JS and Grand diagram format, when I do that and open the popup and try to close it by clickin OK it fails. It produces an error that I have no way of fixing since it is in the min.js file this is console output when I press OK on that popup:

Uncaught TypeError: Cannot read property 'trim' of undefined
    at HTMLDivElement.<anonymous> (markdown-plus.min.js:92)
    at HTMLDocument.dispatch (markdown-plus.min.js:39)
    at HTMLDocument.m.handle (markdown-plus.min.js:39)
    at Object.trigger (markdown-plus.min.js:40)
    at HTMLDivElement.<anonymous> (markdown-plus.min.js:40)
    at Function.each (markdown-plus.min.js:38)
    at oe.fn.init.each (markdown-plus.min.js:38)
    at oe.fn.init.trigger (markdown-plus.min.js:40)
    at HTMLAnchorElement.<anonymous> (markdown-plus.min.js:75)
    at HTMLDivElement.dispatch (markdown-plus.min.js:39)

Is it possible to customize preferences popup at all?

tylerlong commented 7 years ago

I am currently rewriting the editor with plugin mechanism, starting with the https://github.com/tylingsoft/markdown-core project. Please stay tuned.

tylerlong commented 7 years ago

Please try the latest version.

Please read the read Setup & Run part for how you can build and run it.

I have migrated this project onto webpack. So you need to be familiar with weboack in order to modify it.