Set `previewImagesInEditor` option to `false` by default

Fixes #251
pull/179/merge
Jeroen Akkerman 4 years ago
parent 3e8830de82
commit 6e48fc293c

@ -4,7 +4,10 @@ All notable changes to easymde will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
<!--## [Unreleased]-->
## [Unreleased]
### Changed
- Set `previewImagesInEditor` option to `false` by default ([#251]).
## [2.12.0] - 2020-09-29
### Added
- `this` context in imageUploadFunction (Thanks to [@JoshuaLicense], [#225]).
@ -167,6 +170,7 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
- Cursor not always showing in "text" mode over the edit field
<!-- Linked issues -->
[#251]: https://github.com/Ionaru/easy-markdown-editor/issues/251
[#239]: https://github.com/Ionaru/easy-markdown-editor/issues/239
[#178]: https://github.com/Ionaru/easy-markdown-editor/issues/178
[#136]: https://github.com/Ionaru/easy-markdown-editor/issues/136

@ -1991,7 +1991,7 @@ EasyMDE.prototype.render = function (el) {
CodeMirror.defineMode('overlay-mode', function(config) {
return CodeMirror.overlayMode(CodeMirror.getMode(config, options.spellChecker !== false ? 'spell-checker' : 'gfm'), options.overlayMode.mode, options.overlayMode.combine);
});
mode = 'overlay-mode';
backdrop = options.parsingConfig;
backdrop.gitHubSpice = false;
@ -2084,11 +2084,11 @@ EasyMDE.prototype.render = function (el) {
});
}
function handleImages() {
if (options.previewImagesInEditor === false) {
if (!options.previewImagesInEditor) {
return;
}
function calcHeight(naturalWidth, naturalHeight) {
var height;
var viewportWidth = window.getComputedStyle(document.querySelector('.CodeMirror-sizer')).width.replace('px', '');
@ -2126,8 +2126,6 @@ EasyMDE.prototype.render = function (el) {
handleImages();
});
this.onWindowResize = function() {
handleImages();
};

Loading…
Cancel
Save