We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Problem, Error, CKEditor

UL css style removed in CKEditor when revisit for editing

Hi

I'm using CK Editor and I've added a class in code view to restyle lists, eg: <ul class="check_list"> (see here http://www.womenssatnav.co.uk/for-you.php). After save it is fine, but if I have to revisit a page in Perch to do additional changes this CSS code has disappeared and it reverts to a standard <ul> and removes the additional code.

I've looked around the forums, but cannot find anything similar and wondered if anyone has an idea of what is happening?

Thanks

Nigel Seymour

Nigel Seymour 0 points

  • 4 years ago

CKEditor always reverts to standard formatting upon editing, stripping out any custom CSS. However, a good way around this is to set up your list in a repeater with it's own template (including your class). That way you avoid this problem altogether.

Thanks Philip,

A bit of a pain, but I guess combining a repeater with the new Blocks function it could work well!

Thanks again

Yep – you beat me too it, blocks would be perfect for it!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Or use a container element with a class, and then style lists within that container rather than styling the lists themselves.

Perfect! Thanks Drew.