-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: EasyMDE #9973
WIP: EasyMDE #9973
Conversation
Thanks for doing this.
Vendoring is fine. We don't have a proper concept to lazy-load based on server's decision yet, but I think I will figure out something and then it can be easily un-vendored. |
<script src="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.js"></script> | ||
{{if .RequireEasyMDE}} | ||
<script src="{{StaticUrlPrefix}}/vendor/plugins/easymde/easymde.min.js"></script> | ||
<script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/codemirror.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Why did it work without CodeMirror being loaded before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be perfectly honest I have no clue, but there is an open PR (that looks unlikely to be merged) regarding it.
Ionaru/easy-markdown-editor#76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I think their method of loading CodeMirror would work in webpack but with this method, we need to manually load it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you should swap the order of these script tags thought.
Needs a rebase. |
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@jolheiser I hope you don't mind I rebased for you. |
I can't seem to be able to get a new line on the current head. |
Codecov Report
@@ Coverage Diff @@
## master #9973 +/- ##
==========================================
- Coverage 42.26% 42.25% -0.02%
==========================================
Files 610 610
Lines 80370 80370
==========================================
- Hits 33971 33959 -12
- Misses 42221 42232 +11
- Partials 4178 4179 +1
Continue to review full report at Codecov.
|
FYI regarding webpack: I attempted to webpack-build simplemde, but I think at least the codemirror addons/modes are not bundleable because What may work is to just copy the CM files and set |
Related: #10729 |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
SimpleMDE will be ripped out eventually, so I guess we can close this. |
Agreed, closing this. |
Convert SimpleMDE to EasyMDE
As far as I can tell this works (haven't done a full test yet), but perhaps it's not ideal.
Ideally this would be done with npm, however I don't understand nearly enough of that wizardry to get it working. We need not only
easymde
andcodemirror
, but all of codemirror's addons/modes.Since SimpleMDE wasn't too pervasive yet, I decided to also rename variables...