Formatting buttons: update preview when all text is deleted
This commit is contained in:
parent
09c3bd9e42
commit
d3c99ff2a1
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ marked.use({
|
||||||
function markdown(first, second) {
|
function markdown(first, second) {
|
||||||
var input = document.getElementById(first);
|
var input = document.getElementById(first);
|
||||||
var dest = document.getElementById(second);
|
var dest = document.getElementById(second);
|
||||||
if(dest && input && input.value.trim() !== ''){
|
if(dest && input){
|
||||||
for (var i = 0; i < dest.children.length; i++) {
|
for (var i = 0; i < dest.children.length; i++) {
|
||||||
dest.removeChild(dest.children[i]);
|
dest.removeChild(dest.children[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue