I have tried several things to get the styles from my loaded page's stylesheet to display in the Style dropdown menu but so far the only way I have found to change the Style dropdown is to edit the fckstyles.xml file. I MUST be doing something wrong because it doesn't make sense that I would have to edit an XML file (rather than a CSS file) to implement styles! And, the XML would have to be edited every time I load a page with a different stylesheet? And, every time I add/edit a style in a stylesheet I would have to also edit an XML file? As I said I must be doing something wrong.
Just to be clear, below is how I think this should work but I cannot figure out how to get it to do so! If anyone knows how to get it to work this way please help! Thanks.
1) when I load FCKeditor it should use its default set of styles in the Style dropdown (from a CSS file rather than an XML file!)
2) when I load an HTML file (which has an associated CSS file linked to it) in FCKeditor the Style dropdown should be automatically updated to offer the styles in the associated CSS stylesheet
3) when I load an HTML file (which has embedded CSS styles in it) in FCKeditor the Style dropdown should be automatically updated to offer the styles in the embedded CSS
4) when I load an HTML file (which has an associated CSS file linked to it and embedded CSS styles in it) in FCKeditor the Style dropdown should be automatically updated to offer the styles in the associated CSS stylesheet as well as the embedded CSS
Essentially, I would expect it to work more like Dreamweaver or other WYSIWYG HTML editors for CSS handling.
Just to be clear, below is how I think this should work but I cannot figure out how to get it to do so! If anyone knows how to get it to work this way please help! Thanks.
1) when I load FCKeditor it should use its default set of styles in the Style dropdown (from a CSS file rather than an XML file!)
2) when I load an HTML file (which has an associated CSS file linked to it) in FCKeditor the Style dropdown should be automatically updated to offer the styles in the associated CSS stylesheet
3) when I load an HTML file (which has embedded CSS styles in it) in FCKeditor the Style dropdown should be automatically updated to offer the styles in the embedded CSS
4) when I load an HTML file (which has an associated CSS file linked to it and embedded CSS styles in it) in FCKeditor the Style dropdown should be automatically updated to offer the styles in the associated CSS stylesheet as well as the embedded CSS
Essentially, I would expect it to work more like Dreamweaver or other WYSIWYG HTML editors for CSS handling.
Re: How To Get Loaded Page Styles into the Style Dropdown Menu?
Re: How To Get Loaded Page Styles into the Style Dropdown Menu?
Well... at least for now you have to edit fckstyles.xml to change the Style dropdown menu, there is no workaround for this.
The new system will be introduced in FCKeditor 3.0 (see ticket #901).
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+