I'd like to second this... Just as we can use config.format_p to add attributes to <p> tags, we should really be able to do the same with <ul>, and with <li> too...
In this case I'm not talking about a styles drop-down -- simply being able to define default attributes -- but the problem is still closely related!
Why don't you simply accomplish this with the css by using a <ul> selector?
/* apply some formatting to unordered list elements within CKEditor editing region *and* within my rendered document (assuming that is your intention.)
@selector - ul
@method2 - use the config.bodyClass configuration option in config.js to specify ul elements within the editing region and bypass potential conflicts with other ul elements (elements that either render the CKEditor UI or other ul elements outside of editable document regions :)
*/
ul {
font-size:1.2em;
}
li {
list-style-type: disc;
color:#666666;
}
I can't help observing about your post that you're apparently against adding a custom style-combo (whether that works or not is a different story) but you want the default ul button to be assigned a custom class. The more consistent approach would be to assign all ul tags a default style definition through the stylesheet.
Let me know whether you agree with my approach and whether this makes sense.
What is preventing you from discontinuing the .class attribute for ul tags in the site going forward? I understand that you want to be consistent with a previous feature that assigned a .class attribute to all ul elements but is there a reason to adhere to that going forward? You'd be continuing a bad practice! Why not?:
.xyz, ul {
/* formatting options here */
}
That way you preserve the previous .class idiosyncrasies and no longer rely on them going forward. In the end, though, I really have no answer to your question about assigning classes to ul/ol elements using the CKEditor plugins for those elements. I've only defined these using the combo-style.
I'm curious to know why you want to continue the use of the .class attribute in this context!
S'alright dude, I really didn't mean to spend more than 5 minutes on this, so added the class at rendering point to fix it quick. Thanks for the offer tho!
Re: Apply style to unordered bulleted list when icon clicked
I'd like to second this... Just as we can use config.format_p to add attributes to <p> tags, we should really be able to do the same with <ul>, and with <li> too...
In this case I'm not talking about a styles drop-down -- simply being able to define default attributes -- but the problem is still closely related!
Re: Apply style to unordered bulleted list when icon clicked
/* apply some formatting to unordered list elements within CKEditor editing region *and* within my rendered document (assuming that is your intention.) @selector - ul @method2 - use the config.bodyClass configuration option in config.js to specify ul elements within the editing region and bypass potential conflicts with other ul elements (elements that either render the CKEditor UI or other ul elements outside of editable document regions :) */ ul { font-size:1.2em; } li { list-style-type: disc; color:#666666; }I can't help observing about your post that you're apparently against adding a custom style-combo (whether that works or not is a different story) but you want the default ul button to be assigned a custom class. The more consistent approach would be to assign all ul tags a default style definition through the stylesheet.
Let me know whether you agree with my approach and whether this makes sense.
Re: Apply style to unordered bulleted list when icon clicked
Re: Apply style to unordered bulleted list when icon clicked
Why not?:
.xyz, ul { /* formatting options here */ }That way you preserve the previous .class idiosyncrasies and no longer rely on them going forward. In the end, though, I really have no answer to your question about assigning classes to ul/ol elements using the CKEditor plugins for those elements. I've only defined these using the combo-style.
I'm curious to know why you want to continue the use of the .class attribute in this context!
Re: Apply style to unordered bulleted list when icon clicked
Re: Apply style to unordered bulleted list when icon clicked
Re: Apply style to unordered bulleted list when icon clicked