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

YUI RTE does not get Selection in IE7

Expand Messages
  • merahul94538
    Hello all, I am trying to get the selected text from RTE when a Select Text link is clicked. MyEditor._getSelection() works fine for firefox but IE does
    Message 1 of 8 , Oct 30, 2007
    • 0 Attachment
      Hello all,

      I am trying to get the selected text from RTE when a 'Select Text'
      link is clicked.
      MyEditor._getSelection() works fine for firefox but IE does not.

      Any ideas please?

      thanks
    • dav.glass@yahoo.com
      merahul94538 -- The _getSelection method is not intended to return the text string of the selection. It returns a usable selection object:
      Message 2 of 8 , Oct 30, 2007
      • 0 Attachment
        merahul94538 --

        The _getSelection method is not intended to return the text string of the selection. It returns a usable selection object:
        http://developer.mozilla.org/en/docs/DOM:window.getSelection
        http://msdn2.microsoft.com/en-us/library/ms535869.aspx

        This example should help you get what you need:
        http://blog.davglass.com/files/yui/editor6/

        Let me know if you need anything else..

        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: merahul94538 <merahul94538@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Tuesday, October 30, 2007 7:21:51 PM
        Subject: [ydn-javascript] YUI RTE does not get Selection in IE7

        Hello all,

        I am trying to get the selected text from RTE when a  'Select Text'
        link is clicked.
        MyEditor._getSelection() works fine for firefox but IE does not.

        Any ideas please?

        thanks




        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/


      • merahul94538
        Thanks I looked at the example and was not able to figure out anything. I am noobie to javascript so most probably I am doing anything wrong. Here is what I am
        Message 3 of 8 , Oct 30, 2007
        • 0 Attachment
          Thanks
          I looked at the example and was not able to figure out anything.
          I am noobie to javascript so most probably I am doing anything wrong.
          Here is what I am trying to do
          User types some text in RTE, hit a button top 'Save data', after that
          I need to get the selected text in RTE and save in the system.
          I can make it work with TinyMCE but i really want to make it work
          with YUI RTE.

          Even the example link you mentioned did not work for me..
          Can you please give me specific example , if possible?
          appreciate any help
          thanks
          --- In ydn-javascript@yahoogroups.com, dav.glass@... wrote:
          >
          > merahul94538 --
          >
          > The _getSelection method is not intended to return the text string
          of the selection. It returns a usable selection object:
          > http://developer.mozilla.org/en/docs/DOM:window.getSelection
          > http://msdn2.microsoft.com/en-us/library/ms535869.aspx
          >
          > This example should help you get what you need:
          > http://blog.davglass.com/files/yui/editor6/
          >
          > Let me know if you need anything else..
          >
          > 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: merahul94538 <merahul94538@...>
          > To: ydn-javascript@yahoogroups.com
          > Sent: Tuesday, October 30, 2007 7:21:51 PM
          > Subject: [ydn-javascript] YUI RTE does not get Selection in IE7
          >
          >
          > Hello all,
          >
          > I am trying to get the selected text from RTE when a 'Select Text'
          > link is clicked.
          > MyEditor._getSelection() works fine for firefox but IE does not.
          >
          > Any ideas please?
          >
          > thanks
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
        • dav.glass@yahoo.com
          merahul94538 -- I must be missing what you are trying to do.. Your first message said: I am trying to get the selected text from RTE when a Select Text
          Message 4 of 8 , Oct 31, 2007
          • 0 Attachment
            merahul94538 --

            I must be missing what you are trying to do.. Your first message said:
            "I am trying to get the selected text from RTE when a  'Select Text' link is clicked. "

            Your next message says:
            "User types some text in RTE, hit a button top 'Save data', after that I need to get the selected text in RTE and save in the system."
             
            I'm not sure what it is you are trying to do..

            Can you post an example that shows what you are trying to accomplish?

            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: merahul94538 <merahul94538@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Tuesday, October 30, 2007 9:47:39 PM
            Subject: [ydn-javascript] Re: YUI RTE does not get Selection in IE7

            Thanks
            I looked at the example and was not able to figure out anything.
            I am noobie to javascript so most probably I am doing anything wrong.
            Here is what I am trying to do
            User types some text in RTE, hit a button top 'Save data', after that
            I need to get the selected text in RTE and save in the system.
            I can make it work with TinyMCE but i really want to make it work
            with YUI RTE.

            Even the example link you mentioned did not work for me..
            Can you please give me specific example , if possible?
            appreciate any help
            thanks
            --- In ydn-javascript@yahoogroups.com, dav.glass@... wrote:
            >
            > merahul94538 --
            >
            > The _getSelection method is not intended to return the text string
            of the selection. It returns a usable selection object:
            > http://developer.mozilla.org/en/docs/DOM:window.getSelection
            > http://msdn2.microsoft.com/en-us/library/ms535869.aspx
            >
            > This example should help you get what you need:
            > http://blog.davglass.com/files/yui/editor6/
            >
            > Let me know if you need anything else..
            >
            > 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: merahul94538 <merahul94538@...>
            > To: ydn-javascript@yahoogroups.com
            > Sent: Tuesday, October 30, 2007 7:21:51 PM
            > Subject: [ydn-javascript] YUI RTE does not get Selection in IE7
            >
            >
            > Hello all,
            >
            > I am trying to get the selected text from RTE when a  'Select Text'
            > link is clicked.
            > MyEditor._getSelection() works fine for firefox but IE does not.
            >
            > Any ideas please?
            >
            > thanks
            >
            >
            >

            > 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/


          • merahul94538
            Sorry for the confusion. Second point is correct User types some text in RTE, hit a button Save data ,Then Save Data button OnClick will trigger a Javascript
            Message 5 of 8 , Nov 1, 2007
            • 0 Attachment
              Sorry for the confusion.

              Second point is correct

              User types some text in RTE, hit a button 'Save data',Then Save Data
              button OnClick will trigger a Javascript code, which gets Selected
              text from RTE. Once the text is received, then I save it to DB with
              AJAX.

              myEditor._getSelection() works for me in firefox and returns me
              actual text selected. but IE7 returns me the object.
              I just need selected text in IE as well.

              Thanks


              --- In ydn-javascript@yahoogroups.com, dav.glass@... wrote:
              >
              > merahul94538 --
              >
              > I must be missing what you are trying to do.. Your first message
              said:
              > "I am trying to get the selected text from RTE when a 'Select
              Text' link is clicked. "
              >
              > Your next message says:
              > "User types some text in RTE, hit a button top 'Save data', after
              that I need to get the selected text in RTE and save in the system."
              >
              > I'm not sure what it is you are trying to do..
              >
              > Can you post an example that shows what you are trying to
              accomplish?
              >
              > 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: merahul94538 <merahul94538@...>
              > To: ydn-javascript@yahoogroups.com
              > Sent: Tuesday, October 30, 2007 9:47:39 PM
              > Subject: [ydn-javascript] Re: YUI RTE does not get Selection in IE7
              >
              >
              > Thanks
              > I looked at the example and was not able to figure out anything.
              > I am noobie to javascript so most probably I am doing anything
              wrong.
              > Here is what I am trying to do
              > User types some text in RTE, hit a button top 'Save data', after
              that
              > I need to get the selected text in RTE and save in the system.
              > I can make it work with TinyMCE but i really want to make it work
              > with YUI RTE.
              >
              > Even the example link you mentioned did not work for me..
              > Can you please give me specific example , if possible?
              > appreciate any help
              > thanks
              > --- In ydn-javascript@yahoogroups.com, dav.glass@ wrote:
              > >
              > > merahul94538 --
              > >
              > > The _getSelection method is not intended to return the text
              string
              > of the selection. It returns a usable selection object:
              > > http://developer.mozilla.org/en/docs/DOM:window.getSelection
              > > http://msdn2.microsoft.com/en-us/library/ms535869.aspx
              > >
              > > This example should help you get what you need:
              > > http://blog.davglass.com/files/yui/editor6/
              > >
              > > Let me know if you need anything else..
              > >
              > > 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: merahul94538 <merahul94538@>
              > > To: ydn-javascript@yahoogroups.com
              > > Sent: Tuesday, October 30, 2007 7:21:51 PM
              > > Subject: [ydn-javascript] YUI RTE does not get Selection in IE7
              > >
              > >
              > > Hello all,
              > >
              > > I am trying to get the selected text from RTE when a 'Select
              Text'
              > > link is clicked.
              > > MyEditor._getSelection() works fine for firefox but IE does not.
              > >
              > > Any ideas please?
              > >
              > > thanks
              > >
              > >
              > >
              > >
              > > Yahoo! Groups Links
              > >
              >
              >
              >
              >
              >
              > Yahoo! Groups Links
              >
            • rballou05
              Both Firefox and IE return a selection object -- the difference is that Firefox has a handy toString() method which makes it look like the selection you
              Message 6 of 8 , Nov 1, 2007
              • 0 Attachment
                Both Firefox and IE return a selection object -- the difference is
                that Firefox has a handy toString() method which makes it look like
                the selection you received is a string. Run typeof() on it and you
                will see that they both return "object".

                That said, if you want to save everything you put into the editor, you
                want to actually do this:

                myEditor.saveHTML()

                That will put the HTML back into the textarea that is associated with
                the editor. Then you can use:

                myEditor.get('textarea').value

                To get the whole value of the textarea.

                If you actually want to get what is selected in the editor, I would
                look at this example provided by Dav Glass:
                http://blog.davglass.com/files/yui/editor6/

                Rob

                --- In ydn-javascript@yahoogroups.com, "merahul94538"
                <merahul94538@...> wrote:
                >
                > Sorry for the confusion.
                >
                > Second point is correct
                >
                > User types some text in RTE, hit a button 'Save data',Then Save Data
                > button OnClick will trigger a Javascript code, which gets Selected
                > text from RTE. Once the text is received, then I save it to DB with
                > AJAX.
                >
                > myEditor._getSelection() works for me in firefox and returns me
                > actual text selected. but IE7 returns me the object.
                > I just need selected text in IE as well.
                >
                > Thanks
                >
                >
                > --- In ydn-javascript@yahoogroups.com, dav.glass@ wrote:
                > >
                > > merahul94538 --
                > >
                > > I must be missing what you are trying to do.. Your first message
                > said:
                > > "I am trying to get the selected text from RTE when a 'Select
                > Text' link is clicked. "
                > >
                > > Your next message says:
                > > "User types some text in RTE, hit a button top 'Save data', after
                > that I need to get the selected text in RTE and save in the system."
                > >
                > > I'm not sure what it is you are trying to do..
                > >
                > > Can you post an example that shows what you are trying to
                > accomplish?
                > >
                > > 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: merahul94538 <merahul94538@>
                > > To: ydn-javascript@yahoogroups.com
                > > Sent: Tuesday, October 30, 2007 9:47:39 PM
                > > Subject: [ydn-javascript] Re: YUI RTE does not get Selection in IE7
                > >
                > >
                > > Thanks
                > > I looked at the example and was not able to figure out anything.
                > > I am noobie to javascript so most probably I am doing anything
                > wrong.
                > > Here is what I am trying to do
                > > User types some text in RTE, hit a button top 'Save data', after
                > that
                > > I need to get the selected text in RTE and save in the system.
                > > I can make it work with TinyMCE but i really want to make it work
                > > with YUI RTE.
                > >
                > > Even the example link you mentioned did not work for me..
                > > Can you please give me specific example , if possible?
                > > appreciate any help
                > > thanks
                > > --- In ydn-javascript@yahoogroups.com, dav.glass@ wrote:
                > > >
                > > > merahul94538 --
                > > >
                > > > The _getSelection method is not intended to return the text
                > string
                > > of the selection. It returns a usable selection object:
                > > > http://developer.mozilla.org/en/docs/DOM:window.getSelection
                > > > http://msdn2.microsoft.com/en-us/library/ms535869.aspx
                > > >
                > > > This example should help you get what you need:
                > > > http://blog.davglass.com/files/yui/editor6/
                > > >
                > > > Let me know if you need anything else..
                > > >
                > > > 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: merahul94538 <merahul94538@>
                > > > To: ydn-javascript@yahoogroups.com
                > > > Sent: Tuesday, October 30, 2007 7:21:51 PM
                > > > Subject: [ydn-javascript] YUI RTE does not get Selection in IE7
                > > >
                > > >
                > > > Hello all,
                > > >
                > > > I am trying to get the selected text from RTE when a 'Select
                > Text'
                > > > link is clicked.
                > > > MyEditor._getSelection() works fine for firefox but IE does not.
                > > >
                > > > Any ideas please?
                > > >
                > > > thanks
                > > >
                > > >
                > > >
                > > >
                > > > Yahoo! Groups Links
                > > >
                > >
                > >
                > >
                > >
                > >
                > > Yahoo! Groups Links
                > >
                >
              • merahul94538
                Rob, Thanks for responding. Yeah, I figured that it is an object of type Text but I don t want the the whole text out of textartea, just the selection. I
                Message 7 of 8 , Nov 1, 2007
                • 0 Attachment
                  Rob,

                  Thanks for responding.
                  Yeah, I figured that it is an object of type 'Text'
                  but I don't want the the whole text out of textartea, just the
                  selection.

                  I looked at the example that Dav Glass provided but I believe I am
                  too new ot JS to understand to make it work. I spent time on it but
                  IE is not cooperating. I see that you struggled with similar thing in
                  past, I would appreciate if you can provide some pointers.
                  --- In ydn-javascript@yahoogroups.com, "rballou05" <rob.ballou@...>
                  wrote:
                  >
                  > Both Firefox and IE return a selection object -- the difference is
                  > that Firefox has a handy toString() method which makes it look like
                  > the selection you received is a string. Run typeof() on it and you
                  > will see that they both return "object".
                  >
                  > That said, if you want to save everything you put into the editor,
                  you
                  > want to actually do this:
                  >
                  > myEditor.saveHTML()
                  >
                  > That will put the HTML back into the textarea that is associated
                  with
                  > the editor. Then you can use:
                  >
                  > myEditor.get('textarea').value
                  >
                  > To get the whole value of the textarea.
                  >
                  > If you actually want to get what is selected in the editor, I would
                  > look at this example provided by Dav Glass:
                  > http://blog.davglass.com/files/yui/editor6/
                  >
                  > Rob
                  >
                  > --- In ydn-javascript@yahoogroups.com, "merahul94538"
                  > <merahul94538@> wrote:
                  > >
                  > > Sorry for the confusion.
                  > >
                  > > Second point is correct
                  > >
                  > > User types some text in RTE, hit a button 'Save data',Then Save
                  Data
                  > > button OnClick will trigger a Javascript code, which gets
                  Selected
                  > > text from RTE. Once the text is received, then I save it to DB
                  with
                  > > AJAX.
                  > >
                  > > myEditor._getSelection() works for me in firefox and returns me
                  > > actual text selected. but IE7 returns me the object.
                  > > I just need selected text in IE as well.
                  > >
                  > > Thanks
                  > >
                  > >
                  > > --- In ydn-javascript@yahoogroups.com, dav.glass@ wrote:
                  > > >
                  > > > merahul94538 --
                  > > >
                  > > > I must be missing what you are trying to do.. Your first
                  message
                  > > said:
                  > > > "I am trying to get the selected text from RTE when a 'Select
                  > > Text' link is clicked. "
                  > > >
                  > > > Your next message says:
                  > > > "User types some text in RTE, hit a button top 'Save data',
                  after
                  > > that I need to get the selected text in RTE and save in the
                  system."
                  > > >
                  > > > I'm not sure what it is you are trying to do..
                  > > >
                  > > > Can you post an example that shows what you are trying to
                  > > accomplish?
                  > > >
                  > > > 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: merahul94538 <merahul94538@>
                  > > > To: ydn-javascript@yahoogroups.com
                  > > > Sent: Tuesday, October 30, 2007 9:47:39 PM
                  > > > Subject: [ydn-javascript] Re: YUI RTE does not get Selection in
                  IE7
                  > > >
                  > > >
                  > > > Thanks
                  > > > I looked at the example and was not able to figure out
                  anything.
                  > > > I am noobie to javascript so most probably I am doing anything
                  > > wrong.
                  > > > Here is what I am trying to do
                  > > > User types some text in RTE, hit a button top 'Save data',
                  after
                  > > that
                  > > > I need to get the selected text in RTE and save in the system.
                  > > > I can make it work with TinyMCE but i really want to make it
                  work
                  > > > with YUI RTE.
                  > > >
                  > > > Even the example link you mentioned did not work for me..
                  > > > Can you please give me specific example , if possible?
                  > > > appreciate any help
                  > > > thanks
                  > > > --- In ydn-javascript@yahoogroups.com, dav.glass@ wrote:
                  > > > >
                  > > > > merahul94538 --
                  > > > >
                  > > > > The _getSelection method is not intended to return the text
                  > > string
                  > > > of the selection. It returns a usable selection object:
                  > > > > http://developer.mozilla.org/en/docs/DOM:window.getSelection
                  > > > > http://msdn2.microsoft.com/en-us/library/ms535869.aspx
                  > > > >
                  > > > > This example should help you get what you need:
                  > > > > http://blog.davglass.com/files/yui/editor6/
                  > > > >
                  > > > > Let me know if you need anything else..
                  > > > >
                  > > > > 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: merahul94538 <merahul94538@>
                  > > > > To: ydn-javascript@yahoogroups.com
                  > > > > Sent: Tuesday, October 30, 2007 7:21:51 PM
                  > > > > Subject: [ydn-javascript] YUI RTE does not get Selection in
                  IE7
                  > > > >
                  > > > >
                  > > > > Hello all,
                  > > > >
                  > > > > I am trying to get the selected text from RTE when a 'Select
                  > > Text'
                  > > > > link is clicked.
                  > > > > MyEditor._getSelection() works fine for firefox but IE does
                  not.
                  > > > >
                  > > > > Any ideas please?
                  > > > >
                  > > > > thanks
                  > > > >
                  > > > >
                  > > > >
                  > > > >
                  > > > > Yahoo! Groups Links
                  > > > >
                  > > >
                  > > >
                  > > >
                  > > >
                  > > >
                  > > > Yahoo! Groups Links
                  > > >
                  > >
                  >
                • rballou05
                  _createCurrentElement will pop the current selection into myEditor.currentElement[0] So you can send that back to the server using AJAX. Rob
                  Message 8 of 8 , Nov 2, 2007
                  • 0 Attachment
                    _createCurrentElement will pop the current selection into
                    myEditor.currentElement[0]

                    So you can send that back to the server using AJAX.

                    Rob

                    --- In ydn-javascript@yahoogroups.com, "merahul94538"
                    <merahul94538@...> wrote:
                    >
                    > Rob,
                    >
                    > Thanks for responding.
                    > Yeah, I figured that it is an object of type 'Text'
                    > but I don't want the the whole text out of textartea, just the
                    > selection.
                    >
                    > I looked at the example that Dav Glass provided but I believe I am
                    > too new ot JS to understand to make it work. I spent time on it but
                    > IE is not cooperating. I see that you struggled with similar thing in
                    > past, I would appreciate if you can provide some pointers.
                    > --- In ydn-javascript@yahoogroups.com, "rballou05" <rob.ballou@>
                    > wrote:
                    > >
                    > > Both Firefox and IE return a selection object -- the difference is
                    > > that Firefox has a handy toString() method which makes it look like
                    > > the selection you received is a string. Run typeof() on it and you
                    > > will see that they both return "object".
                    > >
                    > > That said, if you want to save everything you put into the editor,
                    > you
                    > > want to actually do this:
                    > >
                    > > myEditor.saveHTML()
                    > >
                    > > That will put the HTML back into the textarea that is associated
                    > with
                    > > the editor. Then you can use:
                    > >
                    > > myEditor.get('textarea').value
                    > >
                    > > To get the whole value of the textarea.
                    > >
                    > > If you actually want to get what is selected in the editor, I would
                    > > look at this example provided by Dav Glass:
                    > > http://blog.davglass.com/files/yui/editor6/
                    > >
                    > > Rob
                    > >
                    > > --- In ydn-javascript@yahoogroups.com, "merahul94538"
                    > > <merahul94538@> wrote:
                    > > >
                    > > > Sorry for the confusion.
                    > > >
                    > > > Second point is correct
                    > > >
                    > > > User types some text in RTE, hit a button 'Save data',Then Save
                    > Data
                    > > > button OnClick will trigger a Javascript code, which gets
                    > Selected
                    > > > text from RTE. Once the text is received, then I save it to DB
                    > with
                    > > > AJAX.
                    > > >
                    > > > myEditor._getSelection() works for me in firefox and returns me
                    > > > actual text selected. but IE7 returns me the object.
                    > > > I just need selected text in IE as well.
                    > > >
                    > > > Thanks
                    > > >
                    > > >
                    > > > --- In ydn-javascript@yahoogroups.com, dav.glass@ wrote:
                    > > > >
                    > > > > merahul94538 --
                    > > > >
                    > > > > I must be missing what you are trying to do.. Your first
                    > message
                    > > > said:
                    > > > > "I am trying to get the selected text from RTE when a 'Select
                    > > > Text' link is clicked. "
                    > > > >
                    > > > > Your next message says:
                    > > > > "User types some text in RTE, hit a button top 'Save data',
                    > after
                    > > > that I need to get the selected text in RTE and save in the
                    > system."
                    > > > >
                    > > > > I'm not sure what it is you are trying to do..
                    > > > >
                    > > > > Can you post an example that shows what you are trying to
                    > > > accomplish?
                    > > > >
                    > > > > 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: merahul94538 <merahul94538@>
                    > > > > To: ydn-javascript@yahoogroups.com
                    > > > > Sent: Tuesday, October 30, 2007 9:47:39 PM
                    > > > > Subject: [ydn-javascript] Re: YUI RTE does not get Selection in
                    > IE7
                    > > > >
                    > > > >
                    > > > > Thanks
                    > > > > I looked at the example and was not able to figure out
                    > anything.
                    > > > > I am noobie to javascript so most probably I am doing anything
                    > > > wrong.
                    > > > > Here is what I am trying to do
                    > > > > User types some text in RTE, hit a button top 'Save data',
                    > after
                    > > > that
                    > > > > I need to get the selected text in RTE and save in the system.
                    > > > > I can make it work with TinyMCE but i really want to make it
                    > work
                    > > > > with YUI RTE.
                    > > > >
                    > > > > Even the example link you mentioned did not work for me..
                    > > > > Can you please give me specific example , if possible?
                    > > > > appreciate any help
                    > > > > thanks
                    > > > > --- In ydn-javascript@yahoogroups.com, dav.glass@ wrote:
                    > > > > >
                    > > > > > merahul94538 --
                    > > > > >
                    > > > > > The _getSelection method is not intended to return the text
                    > > > string
                    > > > > of the selection. It returns a usable selection object:
                    > > > > > http://developer.mozilla.org/en/docs/DOM:window.getSelection
                    > > > > > http://msdn2.microsoft.com/en-us/library/ms535869.aspx
                    > > > > >
                    > > > > > This example should help you get what you need:
                    > > > > > http://blog.davglass.com/files/yui/editor6/
                    > > > > >
                    > > > > > Let me know if you need anything else..
                    > > > > >
                    > > > > > 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: merahul94538 <merahul94538@>
                    > > > > > To: ydn-javascript@yahoogroups.com
                    > > > > > Sent: Tuesday, October 30, 2007 7:21:51 PM
                    > > > > > Subject: [ydn-javascript] YUI RTE does not get Selection in
                    > IE7
                    > > > > >
                    > > > > >
                    > > > > > Hello all,
                    > > > > >
                    > > > > > I am trying to get the selected text from RTE when a 'Select
                    > > > Text'
                    > > > > > link is clicked.
                    > > > > > MyEditor._getSelection() works fine for firefox but IE does
                    > not.
                    > > > > >
                    > > > > > Any ideas please?
                    > > > > >
                    > > > > > thanks
                    > > > > >
                    > > > > >
                    > > > > >
                    > > > > >
                    > > > > > Yahoo! Groups Links
                    > > > > >
                    > > > >
                    > > > >
                    > > > >
                    > > > >
                    > > > >
                    > > > > Yahoo! Groups Links
                    > > > >
                    > > >
                    > >
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.