Opened 12 years ago

Last modified 7 years ago

#9405 confirmed Bug

Object style from the styles combo not visible in the styles combo

Reported by: Joel Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.2.1
Keywords: Cc:

Description (last modified by Jakub Ś)

When an instance is loaded with a custom stylesSet that contains a table or image style and there already is a table or image with that style in the loaded content, the style is not displayed in the styles combo when the table or image has the caret/focus.

Expected: the style would be visible in the combo. It works as expected with even triple nested unordered lists, but not tables or images (see example). Other elements not tested at this point, but basically all the styles combo possible elements (like div) might be good to be checked.

Example at Jsfiddle

Tested with CKEditor 3.6.2 Reproducable in IE9, Firefox 15.0.1 and Chrome 18. All running on Windows 7.

Please see comment:5 and comment:6 for further explanation.

Attachments (3)

9405.html (1.5 KB) - added by Garry Yao 12 years ago.
Simplified TC
test2_cke3.html (2.0 KB) - added by Jakub Ś 11 years ago.
test2_cke4.html (1.9 KB) - added by Jakub Ś 11 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by Joel

If the image that has a stylesSet style set is contained within a paragraph that also has a stylesSet style, the style of the paragraph is shown nicely. If the table that has the style is nested in a div, the style of the div is shown nicely, but not the style of the table. See v5 of the jsfiddle.

comment:2 Changed 12 years ago by Joel

Looks like the problem appears only when the image style consists of two classes instead of one.

comment:3 Changed 12 years ago by Garry Yao

Component: GeneralCore : Styles
Status: newconfirmed
Version: 4.0 (GitHub - master)

We can accept this ticket as a design bug, since now that the style system doesn't support for multiple classes.

Changed 12 years ago by Garry Yao

Attachment: 9405.html added

Simplified TC

comment:4 Changed 12 years ago by Joel

Many thanks for accepting this as a bug. Are design bugs considered equal to other bugs; meaning is this likely to change or be patched in the not-too-distant future? This affects a critical part of my app, I have two different classes at the minimum that I need to indicate if different attributes are set or not for a given element.

comment:5 Changed 11 years ago by Jakub Ś

Version: 4.0 (GitHub - master)3.2.1

Some notes:

  1. CKEditor's styles combo has started reflecting selection from version 3.2.1.
  2. It has never been reflecting objects styles for tables or images "by default".
  3. "object styles" in styles dropdown are only shown for particular object when you click on it in editing area. What is more, they are only "object styles" that are shown (If you click on a table only styles for table are shown).
  4. @garry.yao perhaps I'm missing something but IMO it doesn't matter whether you have one class assigned to table img or many. Styles dropdown will never show styles for table image unless you click on it. Please see test2_ckeX.html.

This is not a regression but this bug will probably be fixed in CKE 4.x only (v4)

Last edited 11 years ago by Jakub Ś (previous) (diff)

Changed 11 years ago by Jakub Ś

Attachment: test2_cke3.html added

Changed 11 years ago by Jakub Ś

Attachment: test2_cke4.html added

comment:6 Changed 11 years ago by Jakub Ś

The same thing as described in comment:5 happens with links

{name: 'Custom anchor', element: 'a', styles: { 'line-height': '18px', color: 'red'}}

#9349 describes the link problem but might be a duplicate of this issue.

comment:9 Changed 11 years ago by Jakub Ś

Description: modified (diff)
Summary: Using a style from the styles combo on a table or image is not visible in the styles combo after loading saved content.Object style from the styles combo not visible in the styles combo

comment:10 Changed 11 years ago by Jakub Ś

Description: modified (diff)

comment:11 Changed 7 years ago by SebCorbin

May be related https://groups.google.com/forum/#!topic/hippo-community/RS7gf_s8ai4

Classes have to be alphabetically ordered to work...

comment:12 Changed 7 years ago by Jakub Ś

@SebCorbin if that is really the case then this issue might be related to #13206.

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