dist/crocodoc.viewer.js
function loadTextLayerHTMLSuccess(text) {
        var doc, textEl;

        if (!text || loaded || destroyed) {
            return;
        }

        loaded = true;

        // create a document to parse the html text
        doc = document.implementation.createHTMLDocument('');
        doc.getElementsByTagName('body')[0].innerHTML = text;
        text = null;

        // select just the element we want (CSS_CLASS_PAGE_TEXT)
        textEl = document.importNode(doc.querySelector('.' + CSS_CLASS_PAGE_TEXT), true);
        $textLayer.attr('class', textEl.getAttribute('class'));
        $textLayer.html(textEl.innerHTML);
        subpx.fix($textLayer);
    }
function loadTextLayerHTMLSuccess(text) {
        var doc, textEl;

        if (!text || loaded || destroyed) {
            return;
        }

        loaded = true;

        // create a document to parse the html text
        doc = document.implementation.createHTMLDocument('');
        doc.getElementsByTagName('body')[0].innerHTML = text;
        text = null;

        // select just the element we want (CSS_CLASS_PAGE_TEXT)
        textEl = document.importNode(doc.querySelector('.' + CSS_CLASS_PAGE_TEXT), true);
        $textLayer.attr('class', textEl.getAttribute('class'));
        $textLayer.html(textEl.innerHTML);
        subpx.fix($textLayer);
    }
function loadTextLayerHTMLSuccess ( text ) { var doc , textEl ; if ( ! text || loaded || destroyed ) { return ; } loaded = true ; // create a document to parse the html text doc = document . implementation . createHTMLDocument ( '' ) ; doc . getElementsByTagName ( 'body' ) [ 0 ] . innerHTML = text ; text = null ; // select just the element we want (CSS_CLASS_PAGE_TEXT) textEl = document . importNode ( doc . querySelector ( '.' + CSS_CLASS_PAGE_TEXT ) , true ) ; $textLayer . attr ( 'class' , textEl . getAttribute ( 'class' ) ) ; $textLayer . html ( textEl . innerHTML ) ; subpx . fix ( $textLayer ) ; }
Handle success loading HTML text
@param {string} text The HTML text
@returns {void}
@private
Handle success loading HTML text