Merge pull request #224 from JoshuaLicense/fix-image-upload-without-status-bar

Fix calls to updateStatusBar when the status bar is hidden
pull/235/head
Jeroen Akkerman 4 years ago committed by GitHub
commit 45e409b85e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1849,6 +1849,10 @@ EasyMDE.prototype.uploadImagesUsingCustomFunction = function (imageUploadFunctio
* @param content {string} the new content of the item to write in the status bar.
*/
EasyMDE.prototype.updateStatusBar = function (itemName, content) {
if (!this.gui.statusbar) {
return;
}
var matchingClasses = this.gui.statusbar.getElementsByClassName(itemName);
if (matchingClasses.length === 1) {
this.gui.statusbar.getElementsByClassName(itemName)[0].textContent = content;

Loading…
Cancel
Save