I have the same problem. It only happens on IE. Firefox/Mozilla is ok. A bug report has already been submited a long time ago and I added my 2 cents to that, but no one is assigned to it. I think this is a show stopper bug. But who am I?
with this: ^^^^^^^^^^^^^^^^^^^^^^ function setFieldValue() { if (trSource.style.display != "none") switchEditMode() ;
if (config.EnableXHTML) oLinkedField.value = getXhtml( objContent.DOM.body ) ; else { /*This modification fixed the following problem: If the user is in Source Mode and they submit the page their changes will not be submitted */ if (txtSource.value != "") oLinkedField.value = txtSource.value ; else var blnEditMode;
} } ^^^^^^^^^^^^^^^^^^^^^^ Everything seems to be working great when I toggle between wysiwyg and code views, and I haven't lost any formatting. Of course, it goes without saying (or does it?): BACKUP your original fck_editor.js file before making any changes, to be on the safe side. Also, I don't know how / if this works for other versions.
P.S., Thank you to whoever first pieced together the replacement code; I'm sorry I couldn't give proper credit.
RE: problems witch switching wysiwig and source-v
RE: problems witch switching wysiwig and source-v
RE: problems witch switching wysiwig and source-v
js/fck_editor.js, line 190 - the setFieldValue function was updated (via response to similar question on another thread in this forum)... I replaced:
^^^^^^^^^^^^^^^^^^^^^^
function setFieldValue()
{
if (trSource.style.display != "none")
switchEditMode() ;
if (config.EnableXHTML)
oLinkedField.value = getXhtml( objContent.DOM.body ) ;
else
oLinkedField.value = objContent.DOM.body.innerHTML ;
}
^^^^^^^^^^^^^^^^^^^^^^
with this:
^^^^^^^^^^^^^^^^^^^^^^
function setFieldValue()
{
if (trSource.style.display != "none")
switchEditMode() ;
if (config.EnableXHTML)
oLinkedField.value = getXhtml( objContent.DOM.body ) ;
else
{
/*This modification fixed the following problem:
If the user is in Source Mode and they submit
the page their changes will not be submitted */
if (txtSource.value != "")
oLinkedField.value = txtSource.value ;
else
var blnEditMode;
try
{
if (objContent.DOM)
blnEditMode = false;
}
catch(e)
{
blnEditMode = true;
}
if (blnEditMode)
oLinkedField.value = txtSource.value ;
else
oLinkedField.value = objContent.DOM.body.innerHTML ;
}
}
^^^^^^^^^^^^^^^^^^^^^^
Everything seems to be working great when I toggle between wysiwyg and code views, and I haven't lost any formatting. Of course, it goes without saying (or does it?): BACKUP your original fck_editor.js file before making any changes, to be on the safe side. Also, I don't know how / if this works for other versions.
P.S., Thank you to whoever first pieced together the replacement code; I'm sorry I couldn't give proper credit.
RE: problems witch switching wysiwig and source-v
RE: problems witch switching wysiwig and source-v
RE: problems witch switching wysiwig and source-v
For now, you can start the editor with a " " value.
It will be corrected for the next version (to be published on February).
FredCK
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn