#872 closed New Feature (worksforme)
Way to show toobar button text
Reported by: | 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.
- 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 ;
- Edited editor\lang\en.js
Edited the following lines to accommidate my text
requirements. InsertImage : "Insert/Edit Image",
- Re-ran packager.
- Posted new code.
This did not work.
To get this icon to display the text properly, I did the following:
- Edited : _source\internals\fcktoolbaritems.js
Commented line:
//case 'Image' : oItem = new FCKToolbarButton( 'Image' , FCKLang.InsertImageLbl, FCKLang.InsertImage ) ; break ;
- Edited editor\lang\en.js
Added
Image : "Insert Image",
- Re-ran packager.
- 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 18 years ago by
Reporter: | changed from Martin Kou to glerma@… |
---|
comment:2 Changed 17 years ago by
Component: | General → UI : Toolbar |
---|
comment:3 Changed 17 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
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 12 years ago by
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
Correction on previous comment:
To get this icon to display the text properly, I did the following:
Commented line:
Added the following line:
Added
This works.
Moved from SF. Original poster: glerma