Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#3099 closed New Feature (fixed)

Need an easy way to let plugins configure their toolbar button icon

Reported by: Martin Kou Owned by: Martin Kou
Priority: Must have (possibly next milestone) Milestone: CKEditor 3.0
Component: UI : Toolbar Version: SVN (FCKeditor) - Retired
Keywords: Oracle Review+ Cc:

Description

It's currently quite troublesome for external plugins to configure the icon for their toolbar buttons: they must include a separate .css file, an icon file which the .css file points to, and instruct the plugin to load the .css into the editor's parent document.

There should be a better way to do this. Propose to add a function like this:

CKEDITOR.ui.button.setIcon( buttonName, iconPath );

Attachments (1)

3099.patch (1.1 KB) - added by Martin Kou 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by Martin Kou

Attachment: 3099.patch added

comment:1 Changed 10 years ago by Martin Kou

Keywords: Review? added

The patch is based on the patch that Fred gave me just a few minutes ago, with some corrections:

  1. Added the missing url() after background-image:
  2. Added background-position:0 0; because the default skin's CSS definition for buttons has an interfering background position clause.

comment:2 Changed 10 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:3 Changed 10 years ago by Martin Kou

Resolution: fixed
Status: newclosed

Fixed with [3186].

Click here for more info about our SVN system.

comment:4 Changed 10 years ago by Martin Kou

btw, the fix works by adding an attribute called "icon" in the button definition object, instead of adding the function in the ticket description.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy