Opened 12 years ago

Closed 12 years ago

Last modified 7 years ago

#872 closed New Feature (worksforme)

Way to show toobar button text

Reported by: glerma@… Owned by:
Priority: Normal Milestone:
Component: UI : Toolbar Version:
Keywords: SF Cc:

Description

I have a requirement to include text on certain toolbar buttons. In this case, we are talking about the 'Image' button.

I attempted to display the optional icon context menu text by doing the following.

  1. Edited : _source\internals\fcktoolbaritems.js

Changed line:

case 'Image' : oItem = new FCKToolbarButton(
'Image' , FCKLang.InsertImageLbl, FCKLang.InsertImage
) ; break ;

to:

case 'Image' : oItem = new FCKToolbarButton(
'Image' , FCKLang.InsertImageLbl,
FCKLang.InsertImage, null, FCK_TOOLBARITEM_ICONTEXT,
true, true ) ; break ;
  1. Edited editor\lang\en.js

Edited the following lines to accommidate my text

requirements.
InsertImage : "Insert/Edit Image",
  1. Re-ran packager.
  1. Posted new code.

This did not work.

To get this icon to display the text properly, I did the following:

  1. Edited : _source\internals\fcktoolbaritems.js

Commented line:

//case 'Image' : oItem = new FCKToolbarButton(
'Image' , FCKLang.InsertImageLbl, FCKLang.InsertImage
) ; break ;

  1. Edited editor\lang\en.js

Added

Image : "Insert Image",

  1. Re-ran packager.
  1. Posted new code.

This works.

Please investigate and correct as a default setting if possible.

Thanks and regards, George Lerma


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1456446&group_id=75348&atid=543656

Change History (4)

comment:1 Changed 12 years ago by Martin Kou

Reporter: changed from Martin Kou to glerma@…

Correction on previous comment:

To get this icon to display the text properly, I did the following:

  1. Edited : _source\internals\fcktoolbaritems.js

Commented line:

//case 'Image' : oItem = new FCKToolbarButton(
'Image' , FCKLang.InsertImageLbl, FCKLang.InsertImage
) ; break ;

Added the following line:

		case 'Image'			: oItem = new FCKToolbarButton( 'Image'		,
FCKLang.Image, null, FCK_TOOLBARITEM_ICONTEXT, true, true )
; break ;
  1. Edited editor\lang\en.js

Added

Image : "Insert Image",

  1. Re-ran packager.
  1. Posted new code.

This works.


Moved from SF. Original poster: glerma

comment:2 Changed 12 years ago by Alfonso Martínez de Lizarrondo

Component: GeneralUI : Toolbar

comment:3 Changed 12 years ago by Alfonso Martínez de Lizarrondo

Resolution: worksforme
Status: newclosed

There's no need to change any core file, you can add this line to a plugin:

FCKToolbarItems.RegisterItem( 'Image'	, new FCKToolbarButton( 'Image', FCKLang.InsertImageLbl, FCKLang.InsertImage, FCK_TOOLBARITEM_ICONTEXT, true, true, 37 ) ) ;

comment:4 Changed 7 years ago by Blaine Garrett

Note: If google brought you here. There is a more updated solution. See: http://stackoverflow.com/questions/8486145/in-ckeditor-how-can-i-add-a-text-label-to-a-button

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