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

Re: [ydn-javascript] Re: Multiple YUI Rich Editors On a Page

Expand Messages
  • dav.glass@yahoo.com
    Nick -- You should not share the config var.. You should use a private config for each instance.. The Element Utility will use the config as is and make
    Message 1 of 4 , Oct 31, 2007
    • 0 Attachment
      Nick --

      You should not share the config var.. You should use a private config for each instance.. The Element Utility will use the config as is and make changes to it..

      So in your render method, change this:
      obj.editor = new YAHOO.widget.Editor(obj.textarea, this.config);

      To this:
      var config = {};
      for (var i in this.config) {
      config[i] = this.config[i];
      }
      obj.editor = new YAHOO.widget.Editor(obj.textarea, config);
      config = null;

      Hope that helps :)
      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: eclipse_fire <nick@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Tuesday, October 30, 2007 9:42:51 PM
      Subject: [ydn-javascript] Re: Multiple YUI Rich Editors On a Page

      Dav,

      Here is an example of my current iteration.
      http://www.federalstreetstudios.com/yui-testing/multiple-rte/

      The code responsible for generating my code is listed here:
      http://www.federalstreetstudios.com/yui-testing/multiple-rte/js/richedit.js

      This is a slightly different approach from my original post but still
      illustrates the problem I'm having.

      Nick

      --- In ydn-javascript@yahoogroups.com, dav.glass@... wrote:
      >
      > Can you post a link so I can see it in action?
      > Or send me the code that you are using to build it?
      >
      > Thanks
      > 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: eclipse_fire <nick@...>
      > To: ydn-javascript@yahoogroups.com
      > Sent: Tuesday, October 30, 2007 6:16:38 PM
      > Subject: [ydn-javascript] Multiple YUI Rich Editors On a Page
      >
      >
      > I'm currently having an issue with the Rich Editor when I am creating
      > multiple editors on a page based on a class name. What essentially
      > seems like is happening is the YAHOO.widget.Editor constructor is not
      > actually creating a new object. When I run my script I get a list of
      > textarea elements and turn each one into a Rich Editor. However I
      > don't get a bunch of editors. I get one editor and a bunch of
      > toolbars. Everything is getting drawn in the same "_container" DIV
      > which houses the editor. Has anyone else run across this? Or does
      > anyone have any ideas?
      >
      >
      >

      > Yahoo! Groups Links
      >





      Yahoo! Groups Links

      <*> To visit your group on the web, go to:
          http://groups.yahoo.com/group/ydn-javascript/

      <*> Your email settings:
          Individual Email | Traditional

      <*> To change settings online go to:
          http://groups.yahoo.com/group/ydn-javascript/join
          (Yahoo! ID required)

      <*> To change settings via email:
          mailto:ydn-javascript-digest@yahoogroups.com
          mailto:ydn-javascript-fullfeatured@yahoogroups.com

      <*> To unsubscribe from this group, send an email to:
          ydn-javascript-unsubscribe@yahoogroups.com

      <*> Your use of Yahoo! Groups is subject to:
          http://docs.yahoo.com/info/terms/


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