Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.39k stars 316 forks source link

Is it possible to toggle preview mode by default? #346

Open Propo41 opened 3 years ago

Propo41 commented 3 years ago

I'm trying to find a way to enable the preview mode by default and disable the user interaction with the toolbar

Ionaru commented 3 years ago

You can hide the toolbar in the options and call the preview method after initialisation.

artknight commented 3 years ago

@Ionaru how do you know when the editor finished initializing? is there like onInit method/event to hook into?

Ionaru commented 3 years ago

After ... = new EasyMDE(...);

artknight commented 3 years ago

After ... = new EasyMDE(...);

but that takes time to instantiate.. so prob a setTimeout should be used?

amcsi commented 2 years ago

And then what do I call on the instance to programmatically turn on preview mode?