pull/304/merge
NicoHood 4 months ago committed by GitHub
commit 695ff0bcd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1801,7 +1801,7 @@ function EasyMDE(options) {
// Handle status bar
if (!Object.prototype.hasOwnProperty.call(options, 'status')) {
options.status = ['autosave', 'lines', 'words', 'cursor'];
options.status = ['autosave', 'lines', 'words', 'characters', 'cursor'];
if (options.uploadImage) {
options.status.unshift('upload-image');
@ -2756,7 +2756,14 @@ EasyMDE.prototype.createStatusbar = function (status) {
} else {
var name = status[i];
if (name === 'words') {
if (name === 'characters') {
defaultValue = function (el) {
el.innerHTML = cm.getValue().length;
};
onUpdate = function (el) {
el.innerHTML = cm.getValue().length;
};
} else if (name === 'words') {
defaultValue = function (el) {
el.innerHTML = wordCount(cm.getValue());
};

Loading…
Cancel
Save