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

Re: [ydn-javascript] Deleting buttons from YUI Editor

Expand Messages
  • Dav Glass
    bardic.knowledge -- You can do that a few ways.. First: myEditor = new YAHOO.widget.SimpleEditor( msgpost , { toolbar: { //Pass in a new toolbar config here..
    Message 1 of 1 , Jan 31, 2008
    • 0 Attachment
      bardic.knowledge --

      You can do that a few ways..

      First:
      myEditor = new YAHOO.widget.SimpleEditor('msgpost', {
      toolbar: {
      //Pass in a new toolbar config here..
      }
      });
      Like this example:
      http://developer.yahoo.com/yui/editor/#toolbar


      Second:
      myEditor = new YAHOO.widget.SimpleEditor('msgpost');
      myEditor.on('toolbarLoaded', function() {
      myEditor.toolbar.removeButton('bold');
      });

      Third:
      myEditor = new YAHOO.widget.SimpleEditor('msgpost');
      myEditor._defaultToolbar.splice(/* Something*/);
      //You can use normal Object/Array manipulation here.

      Does that help ?
      Dav


      Dav Glass
      dav.glass@...
      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 +

      ----- Original Message ----
      From: bardic.knowledge <bardic.knowledge@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Thursday, January 31, 2008 7:33:12 AM
      Subject: [ydn-javascript] Deleting buttons from YUI Editor

      Sorry for the newbie question, but as you can guess, I am new to YUI.
      I want to use the yui editor, but I would like to remove a couple of
      the buttons from the the simple interface.

      I've tried:

      var myEditor = new YAHOO.widget.SimpleEditor('msgpost', {
      height: '300px',
      width: '530px',
      //destroyButton('b1');
      //destroyButton('fontstyle');
      dompath: true //Turns on the bar at the bottom
      });
      myEditor.render();

      But all that happens is that the interface is deleted and not just the
      button. Help would be much appreciated ^^




      Yahoo! Groups Links
    Your message has been successfully submitted and would be delivered to recipients shortly.