Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8832

Kentico CKEditor Configure Style Set Dynamically

$
0
0
I'm using Kentico 9 and I'd like to be able to use different CK Editor style sets on different pages. I have added a style set to the styles.js file as follows.CKEDITOR.stylesSet.add("mystyles", [{ name: "testone", element: "p" }]); Then in the page I've added some JS as per the CK Editor web site.if (CKEDITOR.currentInstance) { CKEDITOR.currentInstance.config.stylesSet = "mystyles"; } When I load the page containing the CK Editor, the style drop down contains the default style set, not the custom one I defined. Does anyone know how to achieve this?

Viewing all articles
Browse latest Browse all 8832

Trending Articles