Skip to content
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

Merged
merged 2 commits into from
Sep 10, 2020

Conversation

ivictbor
Copy link

@ivictbor ivictbor commented Sep 10, 2020

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.
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).

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()`

Copy link
Owner

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 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ionaru agree, thx, done

@@ -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) {
Copy link
Owner

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?

Copy link
Author

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

Copy link
Owner

@Ionaru Ionaru left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants