function editContent( sTextToEditId ) { var oDiv = document.getElementById( sTextToEditId ); var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf("apps/99")) + "portal/scripts/fckeditor/"; var oFCKeditor = new FCKeditor( sTextToEditId ) ; oFCKeditor.BasePath = sBasePath; oFCKeditor.Config["CustomConfigurationsPath"] = "../fse.js"; oFCKeditor.DocType = ''; var aCSSResources = [ "/fse/salesteamportal/customculinary/resources/core/css/stylesheet.css" , "/fse/salesteamportal/customculinary/resources/custom/css/stylesheet.css" ];; oFCKeditor.Config["EditorAreaCSS"] = aCSSResources; // this doesn't seem to have the desired effect oFCKeditor.ToolbarSet = "FSE"; oFCKeditor.Value = oDiv.innerHTML; oFCKeditor.Height = 700; oDiv.innerHTML = oFCKeditor.CreateHtml(); var fnSaveContent = function () { saveContent( sTextToEditId ); }; var oButton = document.getElementById( "editButton" ); oButton.onclick = fnSaveContent; oButton.value = "Save Changes"; }; function saveContent( sTextToEditId ) { var oButton = document.getElementById( "editButton" ); oButton.onclick = function() { editContent( sTextToEditId ); }; oButton.value = "Edit Content"; var oDiv = document.getElementById( sTextToEditId ); var oEditor = FCKeditorAPI.GetInstance( sTextToEditId ); oDiv.innerHTML = oEditor.GetXHTML( false ); };