Replace pendingHtml system with newDocInput and moving the intro doc logic into CoffeeScript.