function onChange() {
    window.clearTimeout(timer);
    timer = window.setTimeout(function () {
        sendMarkdown();
    }, 1000);
}
/**
 * On call wait one sec. After that call sendMarkdown(). If is call repeatedly, timer is set tu one sec again.
 */
On call wait one sec. After that call sendMarkdown(). If is call repeatedly, timer is set tu one sec again.
On call wait one sec . After that call sendMarkdown () . If is call repeatedly timer is set tu one sec again .
function onChange() {
    window.clearTimeout(timer);
    timer = window.setTimeout(function () {
        sendMarkdown();
    }, 1000);
}
function onChange ( ) { window . clearTimeout ( timer ) ; timer = window . setTimeout ( function ( ) { sendMarkdown ( ) ; } , 1000 ) ; }
On call wait one sec.
On call wait one sec .