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:
Re: reload editor Format drop down
Re: reload editor Format drop down
and here is my new change Template function:
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!