ckstyles icon indicating copy to clipboard operation
ckstyles copied to clipboard

Restrict blockstyles to specific tags

Open DrillSergeant opened this issue 2 years ago • 1 comments

Current situation We have defined a blockstyle "lead" which should be available for paragraphs (p-tags). This blockstyle can be selected for paragraphs but also for h2 elements inside the RTE.

Favored behaviour Would be nice if I could restrict the blockstyle to paragraph-tags, so the user cannot select that blockstyle for h2-tags and if he switches an paragaph from a p.lead to a h2 the blockstyle would automatically be removed.

Is that possible somehow?

Currently we just ignore the lead-class for anything else that paragraph-tags, but I would prefer if they would not be even selectable for them.

DrillSergeant avatar Jul 13 '22 12:07 DrillSergeant

Unfortunately, this isn't possible at the moment. The workaround you provided is the way I would take in this case.

But we would appreciate your PR to implement this feature!

anianweber avatar Jul 13 '22 13:07 anianweber