TS 6.5
I'm trying to run some commands on VFE fields via javasript in my dct but they only seem to work if you actually click inside the VFE field first - so that it actually displays the editor.
Since 6.x, only one editor is ever displayed/loaded if you have more than one editor on the screen.
It seems like you cannot run commands on the editor unless it is loaded.
I'm trying to do some post validation, hence I need to iterate through all of the instances on the screen. I have no yet figured out how to force a "load" so that I can then manipulate it.
eWebEditPro.instances
.editor.isEditorReady() returns false for an editor that is not loaded and of course it returns true if it is loaded.
eWebEditPro.instances.editor.focus() does not seem to do it - the method is only available once the editor is loaded.
Here's a sample of what I'm trying to do:
...
eWebEditPro = top._dcWin.eWebEditPro;
eWebEditProExecCommandHandlers = top._dcWin.eWebEditProExecCommandHandlers;
eWebEditProUtil = top._dcWin.eWebEditProUtil;
...
function some_pre_validation_clean_up
for (var i=0; i< eWebEditPro.instances.length; i++)
{
alert(eWebEditPro.instances[0].editor.isEditorReady());
// eWebEditPro.instances.editor.ExecCommand("cpbcleancontent", "", 0);
}
}
Now the line commented out will only run on a VFE that is loaded on the screen (if any).
Essentially it will only run where the alert returns "true".
I can't find the freakin command that will envoke, load or whatever each VFE field.
There has to be one - has any one run into this?..!?
John Cuiuli