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

Make previewImagesInEditor false by default #251

Closed
dalboris opened this issue Oct 4, 2020 · 3 comments
Closed

Make previewImagesInEditor false by default #251

dalboris opened this issue Oct 4, 2020 · 3 comments
Labels

Comments

@dalboris
Copy link

dalboris commented Oct 4, 2020

After upgrading to v2.12.0, I noticed that now images are shown in the editor. It was quite surprising to see such a big behavior change for a minor upgrade. I am using an unversioned CDN ("https://unpkg.com/easymde/dist/easymde.min.js"), so I didn't initiate the upgrade manually, and at first I thought there was some kind of bug. I toggled the edit/preview button multiple times, refreshed the page, until I finally investigated and found that the "issue" was caused by a new feature:

#235

While this is a potentially useful feature (thx @ivictbor !), I really think this ought to be false by default. The first reason is obviously to be backward compatible with the previous behavior. The second reason is that even without backward compatibility concerns, I think showing the image in the editor kinda defeats the primary purpose of Markdown editing, which is to have precise control over the Markdown text to be sent to the server. When images are displayed, it makes editing harder and clunky. We cannot really be sure how many new lines or whitespaces there are before/after the image, and overall we lose some confidence about what's in the Markdown. I think that in most cases, if we want to see images, then a WYSYWYG editor makes more sense than a Markdown editor. It's subjective, obviously, but I feel that I may have not chosen easyMDE if in the demo page I had experienced this behavior, and not seen that it could be disabled.

Anyway, I've already personally turned it off, thanks a lot for making this possible! I just wanted to bring this to your attention, and perhaps start a discussion if others would like to argue for or against having it to false by default.

@dalboris dalboris added the Bug label Oct 4, 2020
@ivictbor
Copy link

ivictbor commented Oct 6, 2020

@dalboris @Ionaru Yep, agree, I think we need to set false (at least for now), I also noted several minor issues, e.g. when image is posted in inline string

@Ionaru Ionaru closed this as completed in 6e48fc2 Oct 6, 2020
@Ionaru
Copy link
Owner

Ionaru commented Oct 6, 2020

Released in 2.12.1

@dalboris
Copy link
Author

dalboris commented Oct 6, 2020

Thanks for the prompt resolution and fast release of 2.12.1! I'm sure this will prevent some headaches from a few clients.

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

No branches or pull requests

3 participants