hello once more. i've got another problem with fckedit. when i use to change the vire for the first time (wysiwig -> html), everything works out fine. but when i try to re-change the view (back to wysiwig), i just get an un-css-ed page with my formatted text, which is not (!) editabel
any suggestions?
thanx, max
Sat, 01/22/2005 - 13:58
#1
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
somebody please help... it is really a show stopper... ..
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