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

Re: [ydn-javascript] Re: Disable all buttons on toolbar

Expand Messages
  • Dav Glass
    Dan -- Editor wasn t designed to handle that by default ;) But you might be able to get away with this: myEditor.on( afterNodeChange , function() {
    Message 1 of 4 , Nov 26, 2008
    • 0 Attachment
      Dan --

      Editor wasn't designed to handle that by default ;)

      But you might be able to get away with this:

      myEditor.on('afterNodeChange', function() {
           this.toolbar.disableAllButtons();
      });

      That will reset the buttons after a node change (which is where Editor enables/disables buttons)

      Dav

      --
      Dav Glass
      davglass@...
      blog.davglass.com


      + Windows: n. - The most successful computer virus, ever. +
      + A computer without a Microsoft operating system is like a dog
         without bricks tied to its head +
      + A Microsoft Certified Systems Engineer is to computing what a
        McDonalds Certified Food Specialist is to fine cuisine  +


      On Wed, Nov 26, 2008 at 12:11 PM, Dan Olsen <dan@...> wrote:

      I want to let text be entered into the editor. There are times that I
      don't want people to use the buttons in the toolbar.

      --- In ydn-javascript@yahoogroups.com, "Dav Glass" <davglass@...>
      wrote:


      >
      > Dan --
      >
      > The Editor will try to re-enable them on the next nodeChange event,
      so that
      > won't work.
      > Have you tried to set the Editor to disabled?
      >
      > myEditor.set('disabled', true);
      >
      > That will disable all buttons and gray out the edit window so it
      can't be
      > edited.
      >
      > Dav
      >
      > --
      > Dav Glass
      > davglass@...

      > blog.davglass.com
      >
      >
      > + Windows: n. - The most successful computer virus, ever. +
      > + A computer without a Microsoft operating system is like a dog
      > without bricks tied to its head +
      > + A Microsoft Certified Systems Engineer is to computing what a
      > McDonalds Certified Food Specialist is to fine cuisine +
      >
      >
      > On Tue, Nov 25, 2008 at 5:07 PM, Dan Olsen <dan@...> wrote:
      >
      > > I am trying to disable all the buttons on my toolbar in my
      > > SimpleEditor. Below is what I am doing.
      > >
      > > var quoteEditor = new YAHOO.widget.SimpleEditor('quoteeditor', {
      > > height: '300px',
      > > width: '550px',
      > > dompath: true,
      > > animate: true
      > > });
      > > quoteEditor.on('toolbarLoaded', function() {
      > > var tb = this.toolbar;
      > > tb.disableAllButtons();
      > > });
      > > quoteEditor.render();
      > >
      > > If anyone can help me out with why this isn't working, please let
      me
      > > know.
      > >
      > >
      > >
      >


    Your message has been successfully submitted and would be delivered to recipients shortly.