if anyone is interested, i made this change to the fck_editor.js file,so that i could view the source in xhtml and also adding newlines for each BR. You can ignore the <p> replacements that was just for me:
function switchEditMode()
{
var bSource = (trSource.style.display == "none") ;
if (bSource) {
//changed by john watson from the following line to next lines
//txtSource.value = objContent.DOM.body.innerHTML ;
thecode= getXhtml(objContent.DOM.body) ;
thecode = thecode.replace("<p>", "");
thecode = thecode.replace("</p>", "<br /><br />");
var pat = /<br \/>/gi;
thecode = thecode.replace(pat, "\n<br />");
txtSource.value = thecode;
}
else
{
objContent.DOM.body.innerHTML = "<div id=__tmpFCKRemove__> </div>" + txtSource.value ;
objContent.DOM.getElementById('__tmpFCKRemove__').removeNode(true) ;
}
trEditor.style.display = bSource ? "none" : "inline" ;
trSource.style.display = bSource ? "inline" : "none" ;
events.fireEvent('onViewMode', bSource) ;
}
John
function switchEditMode()
{
var bSource = (trSource.style.display == "none") ;
if (bSource) {
//changed by john watson from the following line to next lines
//txtSource.value = objContent.DOM.body.innerHTML ;
thecode= getXhtml(objContent.DOM.body) ;
thecode = thecode.replace("<p>", "");
thecode = thecode.replace("</p>", "<br /><br />");
var pat = /<br \/>/gi;
thecode = thecode.replace(pat, "\n<br />");
txtSource.value = thecode;
}
else
{
objContent.DOM.body.innerHTML = "<div id=__tmpFCKRemove__> </div>" + txtSource.value ;
objContent.DOM.getElementById('__tmpFCKRemove__').removeNode(true) ;
}
trEditor.style.display = bSource ? "none" : "inline" ;
trSource.style.display = bSource ? "inline" : "none" ;
events.fireEvent('onViewMode', bSource) ;
}
John