-
Notifications
You must be signed in to change notification settings - Fork 327
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
Add images preview in edit mode plus add keydown cleanup #235
Conversation
README.md
Outdated
@@ -73,6 +73,8 @@ var easyMDE = new EasyMDE(); | |||
</script> | |||
``` | |||
|
|||
If you need to remove installed listeners (when editor not needed anymore), call `easyMDE.cleanup()` | |||
|
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.
The placement of the documentation is a bit odd, in between the parts describing how to load the editor. Maybe move this to https://github.com/Ionaru/easy-markdown-editor#removing-easymde-from-text-area ?
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.
@Ionaru agree, thx, done
src/js/easymde.js
Outdated
@@ -2048,7 +2049,8 @@ EasyMDE.prototype.render = function (el) { | |||
if (options.status !== false) { | |||
this.gui.statusbar = this.createStatusbar(); | |||
} | |||
if (options.autosave != undefined && options.autosave.enabled === true) { | |||
var autosaveEnabled = options.autosave != undefined && options.autosave.enabled === true; | |||
if (autosaveEnabled) { |
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.
What's the purpose of this change?
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.
@Ionaru well basically I reused change listener, so reused this check, though you ar right, rolled back now
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.
Thank you for the contribution!
Hey @Ionaru ,
thanks for taking a fork of this and continue working on it! Our team needs some lightweight embeddable markdown editor with good visual capabilities so we decided to take a fork from EasyMDE and will return the features to upstream if you have time to review/discuss it and will be ready to move in the same direction.
I started with a visualisation of images.
![](https://camo.githubusercontent.com/5c81de859ce08eb583c9a57142306110cdfe8dc571823eee6177cdf760a143f3/68747470733a2f2f6d616b65746970732e6e65742f6d656469612f75706c6f6164732f323032302f30392f31302f5572333968453847636177623838426674366d3665622d31353137633832662e706e67)
Here is a preview how it looks:
Same feature was in (https://stackedit.io/app), but that editor is very heavy/not embeddable and does not work on mobile when EasyMDE is neat and suites most needs.
My planned next actions: (optional setting for buttons which will be put on top of images - this would allow easily attach image editor/delete an image).