window.addEventListener('load', function () {
  var loadMsg = document.getElementById('loadMsg');
  if (typeof DocsAPI != 'undefined') {
    loadMsg.remove();
    var placeHolder = document.createElement('div');
    placeHolder.id = 'placeholder';
    document.body.appendChild(placeHolder);
    new DocsAPI.DocEditor("placeholder", Settings);
  } else {
    loadMsg.firstChild.innerText = 'Failed to load API. Perhaps "'+DocumentServerURL+'" is offline.';
  }
});