require(["dojo/dom", "dojo/query", "dojo/on", "dojo/request", "showdown", "showdown-github", "showdown-table", "dojo/domReady!"], function(dom, query, on, request, showdown, showdownGithub, showdownTable){ function resizeFrame(elem) { elem.style.height = (window.innerHeight - 280) + "px"; } function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, ""])[1].replace(/\+/g, '%20')) || null } var nodePath = getURLParameter("nodeRef").replace(":/",""); request.get(Alfresco.constants.PROXY_URI_RELATIVE + "/slingshot/doclib2/node/" + nodePath,{ handleAs: "json"}).then(function(nodeData) { var locationPath = Alfresco.constants.PROXY_URI_RELATIVE + "markdown" + nodeData.item.location.repoPath + "/"; //Once we have the content, let's create a converter and add the html to the div element var converter = new showdown.Converter({ extensions: [ function() { return [{ type: 'output', filter: function(source) { return source.replace(/