Opened 10 years ago

Last modified 9 years ago

#11120 confirmed New Feature

Support for multiple simultaneous Block level styles is missing

Reported by: Joel Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version:
Keywords: Cc: joel.peltonen@…

Description

After reading the documentation I thought it would be possible to apply many styles for an element. Yet in practice it looks like it's possible for inline styles, but not block level styles?

This would a be very useful feature in a situation like this:

    config.stylesSet = [
        {name: 'P1', element: 'p', attributes: { class: 'styled', elementclass: 'Emphasized'}},
        {name: 'P2', element: 'p', attributes: { class: 'styled', elementclass: 'Draft'}},
        {name: 'P3', element: 'p', attributes: { class: 'styled', elementclass: 'Quote'}},
        {name: 'DIV1', element: 'div', attributes: { class: 'styled', elementclass: 'Draft'}}
    ];

I want to select multiple elementclass values with the shared class styled. The editor would reflect that the element is styled with one or more elementclass, but the actual style is context-dependent. For example users could mark a P element like this: "This paragraph is an Emphasized Quote" - the users custom stylesheet would then define the Quote and the Emphasis styles, which could both be active at the same time. Currently this is apparently impossible?

If you think it's not useful or not possible, the documentation should clearly state that multiple block level styles is not supported. Also it's strange that the styling can change a P element to a DIV and back - a big semantic change. What if P and DIV allowedContent is different?

I would prefer a config option to choose that the stylescombo dropdown only showed styles available for the currently focused element and the conversion could thus be avoided.

Change History (4)

comment:1 Changed 10 years ago by Joel

Summary: Support for Block level styles is missingSupport for multiple simultaneous Block level styles is missing

comment:2 Changed 9 years ago by Jakub Ś

Status: newconfirmed

At the moment it is not possible however having dynamic block-level styles or applicable to all elements would be quite a feature.

comment:3 Changed 9 years ago by Jakub Ś

Other issues can be found in #10824, #10675, #4505, #10742, #5980.

comment:4 Changed 9 years ago by Jakub Ś

#13536 was marked as duplicate.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy