Hi, in past versions I was able to check by using this function and passing in 'instanceName___Frame' as the ed_name parameter:
function getfck(ed_name){ if (document.all) return (document.all[ed_name].contentWindow.document.all['eEditorArea']).contentWindow.document.body.innerHTML; else if (document.getElementById) return (document.getElementById(ed_name).contentWindow.document.getElementById('eEditorArea')).contentWindow.document.body.innerHTML; }
Then I test the returned value to see if it's empty or not. But since version 2.3, I've been getting JS error messages saying 'contentWindow' is null or not an object.
RE: Cannot chek if there is no text with JS
function getfck(ed_name){
if (document.all) return (document.all[ed_name].contentWindow.document.all['eEditorArea']).contentWindow.document.body.innerHTML;
else if (document.getElementById) return (document.getElementById(ed_name).contentWindow.document.getElementById('eEditorArea')).contentWindow.document.body.innerHTML;
}
Then I test the returned value to see if it's empty or not. But since version 2.3, I've been getting JS error messages saying 'contentWindow' is null or not an object.
Does anyone know why? Thanks!
RE: Cannot chek if there is no text with JS
RE: Cannot chek if there is no text with JS
function fck_filled(ed_name){
if (FCKeditorAPI.GetInstance(ed_name).GetXHTML() == "") return false;
else return true;
}
if (!fck_filled('description')) alert('The editor is empty');
else alert('The editor has something in it');