mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 23:54:28 -06:00
Merge e1527365d25bb3802568334d4151bc7c527587b5 into 2996b67ec95ec69000ee03ccaee4fcca26cfc701
This commit is contained in:
commit
029a6e06de
@ -1801,7 +1801,7 @@ function EasyMDE(options) {
|
|||||||
|
|
||||||
// Handle status bar
|
// Handle status bar
|
||||||
if (!Object.prototype.hasOwnProperty.call(options, 'status')) {
|
if (!Object.prototype.hasOwnProperty.call(options, 'status')) {
|
||||||
options.status = ['autosave', 'lines', 'words', 'cursor'];
|
options.status = ['autosave', 'lines', 'words', 'characters', 'cursor'];
|
||||||
|
|
||||||
if (options.uploadImage) {
|
if (options.uploadImage) {
|
||||||
options.status.unshift('upload-image');
|
options.status.unshift('upload-image');
|
||||||
@ -2758,7 +2758,14 @@ EasyMDE.prototype.createStatusbar = function (status) {
|
|||||||
} else {
|
} else {
|
||||||
var name = status[i];
|
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) {
|
defaultValue = function (el) {
|
||||||
el.innerHTML = wordCount(cm.getValue());
|
el.innerHTML = wordCount(cm.getValue());
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user