Loading ...
Sorry, an error occurred while loading the content.

How to display the 'label' inside a toolbar 'push' button?

Expand Messages
  • har125
    Hi there! I use The YUI Rich Text Editor with YUI Toolbar inside... I created some new Buttons like ... Now I want to have the defined label Vorname inside
    Message 1 of 2 , Apr 29, 2009
    • 0 Attachment
      Hi there!

      I use The YUI Rich Text Editor with YUI Toolbar inside...
      I created some new Buttons like

      >> { type: 'push', label: 'Vorname', value: 'mybutton1' }, ...

      I successfully added some event-code:

      >> editor.on('toolbarLoaded', function() {
      >> this.toolbar.on('mybutton1Click', function(o) {
      >> this.execCommand('inserthtml', '%VORNAME%');
      >> }, editor, true);
      >> });

      Now I want to have the defined label 'Vorname' inside that Button as text to click on...

      I already got it larger with

      >> .yui-skin-sam .yui-toolbar-container .yui-toolbar-mybutton6 {
      >> width: 75px;
      >> }

      But it´s just empty...
      I found something I tried to use here:
      ** http://blog.davglass.com/files/yui/toolbar1/
      there 'Bold', 'Italic' and 'Underlined' is written inside the buttons... that´s exactly what I need... But with my attempt i can´t get it drawn!

      But after hours of trying and analyzing I found out there YUI 2.5.2 is used and if I switch to 2.7.0 the Buttons become empty...

      So how can I get Buttons with the 'label' text inside?

      Pls help me ;)

      Thx,
      har!
    • Dav Glass
      har! -- I have updated the example to work with 2.7.0. Just add this to the last CSS rule in the example: font-size: 12px; Dav
      Message 2 of 2 , Apr 29, 2009
      • 0 Attachment
        har! --

        I have updated the example to work with 2.7.0.

        Just add this to the last CSS rule in the example:
        font-size: 12px;

        Dav


        On Wed, 29 Apr 2009, har125 wrote:

        > Hi there!
        >
        > I use The YUI Rich Text Editor with YUI Toolbar inside...
        > I created some new Buttons like
        >
        > >> { type: 'push', label: 'Vorname', value: 'mybutton1' }, ...
        >
        > I successfully added some event-code:
        >
        > >> editor.on('toolbarLoaded', function() {
        > >> this.toolbar.on('mybutton1Click', function(o) {
        > >> this.execCommand('inserthtml', '%VORNAME%');
        > >> }, editor, true);
        > >> });
        >
        > Now I want to have the defined label 'Vorname' inside that Button as text to click on...
        >
        > I already got it larger with
        >
        > >> .yui-skin-sam .yui-toolbar-container .yui-toolbar-mybutton6 {
        > >> width: 75px;
        > >> }
        >
        > But it´s just empty...
        > I found something I tried to use here:
        > ** http://blog.davglass.com/files/yui/toolbar1/
        > there 'Bold', 'Italic' and 'Underlined' is written inside the buttons... that´s exactly what I need... But with my attempt i can´t get it drawn!
        >
        > But after hours of trying and analyzing I found out there YUI 2.5.2 is used and if I switch to 2.7.0 the Buttons become empty...
        >
        > So how can I get Buttons with the 'label' text inside?
        >
        > Pls help me ;)
        >
        > Thx,
        > har!
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.