Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > WYSIWYG Editor Styles View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 9/10/2012 11:57:56 AM
   
WYSIWYG Editor Styles
I've looked through the forums quite a bit today and haven't found what I was looking for (only some old references and references that did not work). I have a 700+ line stylesheet and I'd like to allow the editors to be able to select some of those styles without having to enter any HTML when using the Editible Text webpart. I've seen references to add code in the CMSAdminControls\CKeditor\plugins\styles\styles\default.js file. Downfall is if I do that, I need to specify the styles manually in there and if they change, now I have to or someone has to remember to change it in 2 places.

Any suggestions or what have others done to simplify this?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/11/2012 1:37:52 AM
   
RE:WYSIWYG Editor Styles
Hi,

I am sorry but the CK editor is not picking up the styles from the site's style sheet - that's why you need to do it in two places. Unless you will customize the CKEditor behavior to use your site's styles - I am not sure if it is even possible.

I am sorry for this inconvenience.

Best regards,
Juraj Ondrus

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 9/12/2012 10:30:08 AM
   
RE:WYSIWYG Editor Styles
I've never understood why it didn't have a CSS Class dropdown like the Telerik RadEditor does. Maybe Kentico can develop a plug-in for the CKEditor that does this. It really is something that I am sure we all would appreciate.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 9/12/2012 10:47:58 AM
   
RE:WYSIWYG Editor Styles
Hi,

Would you wish this plug-in to be developed?
Please, tell us what would you like to see in the future versions through Kentico UserVoice.

The best and most required ideas will be (or already are) really implemented!

Best regards,
Martin Danko

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 9/12/2012 10:57:41 AM
   
RE:WYSIWYG Editor Styles
Take a look at this page CKEditor Developer Guid - Styles

If you add the StyleSheetParser plugin and set the stylesheet for the content, it should automatically parse the styles out of your stylesheet and add them to the dropdown list.

You could create a handler that you can somehow pass an argument to that will tell it which style sheet it needs to use for the editor and set that handler as the custom config file.

I am still researching to see if you can make a web part to add the styles after the page has loaded.