plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.js
function _wrapMatchesInNode(textNode) {
    var parentNode  = textNode.parentNode,
        nodeValue   = wysihtml5.lang.string(textNode.data).escapeHTML(),
        tempElement = _getTempElement(parentNode.ownerDocument);

    // We need to insert an empty/temporary <span /> to fix IE quirks
    // Elsewise IE would strip white space in the beginning
    tempElement.innerHTML = "<span></span>" + _convertUrlsToLinks(nodeValue);
    tempElement.removeChild(tempElement.firstChild);

    while (tempElement.firstChild) {
      // inserts tempElement.firstChild before textNode
      parentNode.insertBefore(tempElement.firstChild, textNode);
    }
    parentNode.removeChild(textNode);
  }
function _wrapMatchesInNode(textNode) {
    var parentNode  = textNode.parentNode,
        nodeValue   = wysihtml5.lang.string(textNode.data).escapeHTML(),
        tempElement = _getTempElement(parentNode.ownerDocument);

    // We need to insert an empty/temporary <span /> to fix IE quirks
    // Elsewise IE would strip white space in the beginning
    tempElement.innerHTML = "<span></span>" + _convertUrlsToLinks(nodeValue);
    tempElement.removeChild(tempElement.firstChild);

    while (tempElement.firstChild) {
      // inserts tempElement.firstChild before textNode
      parentNode.insertBefore(tempElement.firstChild, textNode);
    }
    parentNode.removeChild(textNode);
  }
function _wrapMatchesInNode ( textNode ) { var parentNode = textNode . parentNode , nodeValue = wysihtml5 . lang . string ( textNode . data ) . escapeHTML ( ) , tempElement = _getTempElement ( parentNode . ownerDocument ) ; // We need to insert an empty/temporary <span /> to fix IE quirks // Elsewise IE would strip white space in the beginning tempElement . innerHTML = "<span></span>" + _convertUrlsToLinks ( nodeValue ) ; tempElement . removeChild ( tempElement . firstChild ) ; while ( tempElement . firstChild ) { // inserts tempElement.firstChild before textNode parentNode . insertBefore ( tempElement . firstChild , textNode ) ; } parentNode . removeChild ( textNode ) ; }
Replaces the original text nodes with the newly auto-linked dom tree
Replaces the original text nodes with the newly auto - linked dom tree