Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#11332 closed Bug (duplicate)

Styles combo does not ever show object styles

Reported by: Simon Holywell Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version:
Keywords: Cc:

Description

I have used the example code at: http://docs.ckeditor.com/#!/api/CKEDITOR.stylesSet to configure a Styles combo/drop down that includes an object style for images. The "Image on Left" object style is never present in the combo regardless of whether I have an image currently selected in the editor or not. It simply does not show up.

You can see my full config/replace call here:

CKEDITOR.replace(this, {
                    extraPlugins: "widget,image2,stylesheetparser",
                    contentsCss: "/cms/editor/editor.css",
                    filebrowserBrowseUrl: "/cms/editor/jasfinder/index.html",
                    disableNativeSpellChecker: false,
                    browserContextMenuOnCtrl: true,
                    stylesSet: [
                      { name: 'Strong Emphasis', element: 'strong' },
                      { name: 'Emphasis', element: 'em' },

                      { name: 'Computer Code', element: 'code' },
                      { name: 'Keyboard Phrase', element: 'kbd' },
                      { name: 'Sample Text', element: 'samp' },
                      { name: 'Variable', element: 'var' },

                      { name: 'Deleted Text', element: 'del' },
                      { name: 'Inserted Text', element: 'ins' },

                      { name: 'Cited Work', element: 'cite' },
                      { name: 'Inline Quotation', element: 'q' },

                      // Object Styles
    {
        name: 'Image on Left',
        element: 'img',
        attributes: {
            style: 'padding: 5px; margin-right: 5px',
            border: '2',
            align: 'left'
        }
    },

                        // Block Styles
    { name: 'Blue Title', element: 'h2', styles: { 'color': 'Blue' } },
    { name: 'Red Title' , element: 'h3', styles: { 'color': 'Red' } },

    // Inline Styles
    { name: 'CSS Style', element: 'span', attributes: { 'class': 'my_style' } },
    { name: 'Marker: Yellow', element: 'span', styles: { 'background-color': 'Yellow' } }
                    ]
                });

Attachments (1)

img.png (129.1 KB) - added by Jakub Ś 10 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by Simon Holywell

Just to clarify the other options specified in stylesSet above do appear in the combo as expected. It is just that one that never shows up.

Additionally we are seeing this in Firefox (Linux) and IE 11, but have not tested on other browsers.

Last edited 10 years ago by Simon Holywell (previous) (diff)

comment:2 Changed 10 years ago by Simon Holywell

I have also just tried this on the nightly and it is also not working there too.

comment:3 Changed 10 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 4.3.1

I can't confirm this. Please see attached image.

Object styles show up only when object (image in this case) is selected.
You probably have some error in your configuration/implementation but this isn't CKEditor bug.

comment:4 Changed 10 years ago by Simon Holywell

That as maybe, but it doesn't really help to resolve the issue. My entire configuration was included in the original ticket and copied from the documentation could you share your working copy or further review mine to assist with finding the error?

I was clicking on an image before clicking on the Styles drop down.

Changed 10 years ago by Jakub Ś

Attachment: img.png added

comment:5 Changed 10 years ago by Jakub Ś

That as maybe, but it doesn't really help to resolve the issue.

Look, this isn't support page or forum but place for reporting bugs in editor.

Try refreshing browsers cache. Anyway it should work out of the box. If it doesn't please download full pacakge, apply your configuration changes one more time and check - it should work.

comment:6 in reply to:  5 Changed 10 years ago by Simon Holywell

Replying to j.swiderski:

Please could you include your working configuration in text format so I can attempt to implement it on my side.

That as maybe, but it doesn't really help to resolve the issue.

Look, this isn't support page or forum but place for reporting bugs in editor.

I thought I had found a bug. Until the bug is confirmed to be in my configuration then from my/a library users point of view it is still a bug hence why I am now asking for help/proof.

Try refreshing browsers cache.

First thing I did before posting this bug report.

If it doesn't please download full pacakge, apply your configuration changes one more time and check - it should work.

I have already done this three times - twice with the full package zip from the homepage and a further time with the nightly as previously mentioned.

comment:7 Changed 10 years ago by Alfonso Martínez de Lizarrondo

The answer is simple: image2 is not compatible with the Styles combo.

comment:8 Changed 10 years ago by Jakub Ś

Resolution: invalid
Status: closedreopened

The answer is simple: image2 is not compatible with the Styles combo.

Thak you @alfonsoml and I'm sorry @Treffynnon but I was checking out image and not image2.

Yes, @alfonsoml is completely right - styles are not yet compatible with widgets which has already been reported here: #11297.

I'm closing this issue as duplicate.

comment:9 Changed 10 years ago by Jakub Ś

Resolution: duplicate
Status: reopenedclosed

comment:10 in reply to:  8 Changed 10 years ago by Simon Holywell

Replying to alfonsoml:

The answer is simple: image2 is not compatible with the Styles combo.

Thank you for the insight.

Replying to j.swiderski:

Yes, @alfonsoml is completely right - styles are not yet compatible with widgets which has already been reported here: #11297.

I'm closing this issue as duplicate.

Thanks for your help as this answers a follow up question I was about to ask!

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