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.47k stars 320 forks source link

How can I configure the editor to be display only? #121

Open WattsC-90 opened 5 years ago

WattsC-90 commented 5 years ago

I want to be able to provide a consistent markdown view between the editor and the viewer. Is there a way to set the EasyMDE object as view only? Or is there a recommendation for alternative?

rodsimpson commented 5 years ago

To can set it to read only like this:

easymde = new EasyMDE();
easymde.codemirror.setOption('readOnly', true);
vanillajonathan commented 2 years ago

It would be good if the readonly and disabled attributes on the textarea element worked.