I want to know if its possible to reload the editor format dropdown without refreshing the page.
I'm using the following to change the css of the editor:
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
oEditor.Config['EditorAreaCSS']= ["fck.css"];
oEditor.SwitchEditMode();
oEditor.SwitchEditMode();
which works fine for the editor but the format dropdown isn't updating its styles.
Any suggestions?
Thanks
I'm using the following to change the css of the editor:
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
oEditor.Config['EditorAreaCSS']= ["fck.css"];
oEditor.SwitchEditMode();
oEditor.SwitchEditMode();
which works fine for the editor but the format dropdown isn't updating its styles.
Any suggestions?
Thanks

Re: reload editor Format drop down
I added the following code to the fckeditor.html file..
and that allows me to pass in a parameter to the iframe that will force the editor to use the new CSS.
To refresh the editor using javascript I have used the following:
var oEditor = FCKeditorAPI.GetInstance('content') ; //get editor object document.getElementById("content").value = oEditor.GetHTML(); //save any changes document.getElementById("content___Frame").src=document.getElementById("content___Frame").src.replace(/templates\/(.*)\/fck.css/,"templates/"+template+"/fck.css"); //refresh the iframe with new cssRe: reload editor Format drop down
Re: reload editor Format drop down
// Base configuration file. LoadScript( '../fckconfig.js' ) ; </script> <script type="text/javascript"> // mod to allow for custom editor area css if(FCKURLParams['EditorAreaCSS']) FCKConfig.EditorAreaCSS = FCKURLParams['EditorAreaCSS']; if ( FCKBrowserInfo.IsIE ) {and here is my new change Template function:
function changeTemplate(template) { var oEditor = FCKeditorAPI.GetInstance('content') ; document.getElementById("content").value = oEditor.GetHTML(); document.getElementById("content___Frame").src=document.getElementById("content___Frame").src.replace(/templates%2F(.*)%2Ffck.css/,"templates%2F"+template+"%2Ffck.css"); }I had to change it because the forward slashes in the url were playing havoc with inserted images.
does that help?
Re: reload editor Format drop down
I am still facing the same errror, by clicking on the drop down cursor is going up , not staying at where I had selected text. Are you getting my point correctly?
Re: reload editor Format drop down
Re: reload editor Format drop down
Re: reload editor Format drop down
I am trying to dynamicaly set the StylesXmlPath without reloading the page. In order to do this it appears the editor has to be reloaded somehow.
So I am appealing to anyone that knows some way to force the Styles menu.. or the whole editor.. to be reloaded.
I have been trying to adapt castles' code:
document.getElementById("editor1").value = ed.GetHTML(); //save any changes
document.getElementById("editor1___Frame").src=document.getElementById("editor1___Frame").src.replace("fckstyles.xml","styles1.xml");
Obviously I am just using styles1.xml to test it.. in reality it would point to a php file that would generate the xml.
I have tried it with and without ed.Config['StylesXmlPath'] = '/cms/fckeditor/styles1.xml'; before the above line.
Whatever I try, the Styles menu still contains the styles from fckstyles.xml.
Thanks for any ideas!