mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-09-24 16:40:55 -06:00
Merge 42baa39b5ae898c4a080e65b117db50ce224aea8 into 6318fc1b193fc419a0aede13738b2be07355b16a
This commit is contained in:
commit
23f9d26c47
@ -166,6 +166,9 @@ var simplemde = new SimpleMDE({
|
|||||||
}
|
}
|
||||||
}], // Another optional usage, with a custom status bar item that counts keystrokes
|
}], // Another optional usage, with a custom status bar item that counts keystrokes
|
||||||
tabSize: 4,
|
tabSize: 4,
|
||||||
|
text: {
|
||||||
|
'preview': 'Vorschau' // Deutsch
|
||||||
|
} // Allows text for the Toolbar tooltips and statusbar items to be changed - only items to be changed need be included - use the name of the item as the key
|
||||||
toolbar: false,
|
toolbar: false,
|
||||||
toolbarTips: false,
|
toolbarTips: false,
|
||||||
});
|
});
|
||||||
|
@ -13,6 +13,11 @@
|
|||||||
min-height: 300px
|
min-height: 300px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[dir='rtl'] .CodeMirror-scroll {
|
||||||
|
margin-right: 0;
|
||||||
|
margin-left: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
.CodeMirror-fullscreen {
|
.CodeMirror-fullscreen {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
@ -196,22 +201,23 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-statusbar span {
|
[dir='rtl'] .editor-statusbar {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-statusbar .wrapper {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 4em;
|
min-width: 4em;
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-statusbar .lines:before {
|
[dir='rtl'] .editor-statusbar .wrapper {
|
||||||
content: 'lines: '
|
margin-left: 0;
|
||||||
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-statusbar .words:before {
|
.editor-statusbar .value:before {
|
||||||
content: 'words: '
|
content: ': ';
|
||||||
}
|
|
||||||
|
|
||||||
.editor-statusbar .characters:before {
|
|
||||||
content: 'characters: '
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-preview {
|
.editor-preview {
|
||||||
|
@ -1349,6 +1349,10 @@ SimpleMDE.prototype.createToolbar = function(items) {
|
|||||||
if(item === "|") {
|
if(item === "|") {
|
||||||
el = createSep();
|
el = createSep();
|
||||||
} else {
|
} else {
|
||||||
|
var icon = item.name;
|
||||||
|
if(self.options.text[icon] !== undefined) {
|
||||||
|
item.title = self.options.text[icon];
|
||||||
|
}
|
||||||
el = createIcon(item, self.options.toolbarTips, self.options.shortcuts);
|
el = createIcon(item, self.options.toolbarTips, self.options.shortcuts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1455,7 +1459,7 @@ SimpleMDE.prototype.createStatusbar = function(status) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
className: name,
|
name: name,
|
||||||
defaultValue: defaultValue,
|
defaultValue: defaultValue,
|
||||||
onUpdate: onUpdate
|
onUpdate: onUpdate
|
||||||
});
|
});
|
||||||
@ -1476,8 +1480,7 @@ SimpleMDE.prototype.createStatusbar = function(status) {
|
|||||||
|
|
||||||
// Create span element
|
// Create span element
|
||||||
var el = document.createElement("span");
|
var el = document.createElement("span");
|
||||||
el.className = item.className;
|
el.className = "value";
|
||||||
|
|
||||||
|
|
||||||
// Ensure the defaultValue is a function
|
// Ensure the defaultValue is a function
|
||||||
if(typeof item.defaultValue === "function") {
|
if(typeof item.defaultValue === "function") {
|
||||||
@ -1495,9 +1498,18 @@ SimpleMDE.prototype.createStatusbar = function(status) {
|
|||||||
}(el, item)));
|
}(el, item)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create span element to hold the item's text
|
||||||
|
var wrapper = document.createElement("span");
|
||||||
|
wrapper.className = "wrapper";
|
||||||
|
if(options.text[item.name] !== undefined) {
|
||||||
|
wrapper.innerHTML = options.text[item.name];
|
||||||
|
} else {
|
||||||
|
wrapper.innerHTML = item.name;
|
||||||
|
}
|
||||||
|
wrapper.appendChild(el);
|
||||||
|
|
||||||
// Append the item to the status bar
|
// Append the item to the status bar
|
||||||
bar.appendChild(el);
|
bar.appendChild(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user