flont.js
//when changing fonts or other major styling, reset the sample to plain text 
when changing fonts or other major styling, reset the sample to plain text
when changing fonts or other major styling reset the sample to plain text
function resetSample() {
        options.sample.querySelectorAll('style').forEach(function(el) {
            el.parentNode.removeChild(el);
        });
        options.sample.querySelectorAll('span[data-letter]').forEach(function(span) {
            var letter = span.getAttribute('data-letter');
            if (letter !== 'undefined') {
                span.textContent = letter;
            }
        });
        options.sample.textContent = options.sample.textContent.trim();
    }
function resetSample ( ) { options . sample . querySelectorAll ( 'style' ) . forEach ( function ( el ) { el . parentNode . removeChild ( el ) ; } ) ; options . sample . querySelectorAll ( 'span[data-letter]' ) . forEach ( function ( span ) { var letter = span . getAttribute ( 'data-letter' ) ; if ( letter !== 'undefined' ) { span . textContent = letter ; } } ) ; options . sample . textContent = options . sample . textContent . trim ( ) ; }
when changing fonts or other major styling, reset the sample to plain text
when changing fonts or other major styling reset the sample to plain text
//some programs put <style> elements in pasted HTML! //replace custom chars with plain text //and remove all the vestigial spans