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

Re: [ydn-javascript] Bug in RTE? (images disappear)

Expand Messages
  • Dav Glass
    Can you post some sample HTML that causes the issue? Dav ... -- Dav Glass davglass@gmail.com blog.davglass.com + Windows: n. - The most successful computer
    Message 1 of 5 , Jul 2, 2009
    • 0 Attachment
      Can you post some sample HTML that causes the issue?

      Dav

      On Thu, 02 Jul 2009, bjoernbg wrote:

      > Hi,
      >
      > I have recently started to use YUI Rich Text Editor and so far have got very good results. There is one issue, though:
      >
      > Whenever I insert an image into a RTE, it works fine. However, quite often when I try to edit a previously included image (e.g. to change the alignment) the property box is not filled with the image's properties but is empty. If I then click the close button (x) of the property box, the image disappears from the text!
      >
      > This happens here on my mac in Safari 4, Firefox 3 and Opera 10...
      > The strange thing is that sometimes it still works...
      >
      > I hope someone can help me with this problem, it's really quite annoying.
      >
      > Best regards,
      > Bjoern
      >

      --
      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 +
    • bjoernbg
      I m not sure what sample HTML you are talking about - I m not using the editor on a simple page. However, I was able to narrow down the problem a bit more. I
      Message 2 of 5 , Jul 3, 2009
      • 0 Attachment
        I'm not sure what sample HTML you are talking about - I'm not using the editor on a simple page.

        However, I was able to narrow down the problem a bit more. I used the method "One Editor, Multiple Edit Areas" (YUI Example) as a starting point, since I possibly have lots of editable textareas on the same page. The difference to the example is that I don't use one editor with one textarea and just move this editor around but instead I got better results with destroying and recreating the editor every time the user clicks another field. Besides that, it all works really well, though.

        The trouble with the image I described earlier seems only to happen, after I left the field with the image to edit elsewhere and then return focus to this field (resulting in a new editor instance being created).

        Any ideas?

        Björn

        --- In ydn-javascript@yahoogroups.com, Dav Glass <davglass@...> wrote:
        >
        > Can you post some sample HTML that causes the issue?
        >
        > Dav
        >
        > On Thu, 02 Jul 2009, bjoernbg wrote:
        >
        > > Hi,
        > >
        > > I have recently started to use YUI Rich Text Editor and so far have got very good results. There is one issue, though:
        > >
        > > Whenever I insert an image into a RTE, it works fine. However, quite often when I try to edit a previously included image (e.g. to change the alignment) the property box is not filled with the image's properties but is empty. If I then click the close button (x) of the property box, the image disappears from the text!
        > >
        > > This happens here on my mac in Safari 4, Firefox 3 and Opera 10...
        > > The strange thing is that sometimes it still works...
        > >
        > > I hope someone can help me with this problem, it's really quite annoying.
        > >
        > > Best regards,
        > > Bjoern
        > >
        >
        > --
        > 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 +
        >
      • bjoernbg
        Ok, I think I found the bug and a workaround. The problem is the following: The first time I create an editor, everything works fine. After that, every time I
        Message 3 of 5 , Jul 3, 2009
        • 0 Attachment
          Ok, I think I found the bug and a workaround.

          The problem is the following:
          The first time I create an editor, everything works fine. After that, every time I create another editor, the function _getBlankImage in editor returns nothing!
          I actually tracked the problem to this line:

          > if (YAHOO.widget.EditorInfo.blankImage) {

          if YAHOO.widget.EditorInfo.blankImage is not empty, then things don't seem to work... I'm not sure what exactly is happening there, so I won't try to fix this problem, but the workaround is kind of easy - every time I destroy an editor, I set YAHOO.widget.EditorInfo.blankImage to undefined and now everything works!

          Cheers!
          Björn


          --- In ydn-javascript@yahoogroups.com, "bjoernbg" <bjoernbg@...> wrote:
          >
          > I'm not sure what sample HTML you are talking about - I'm not using the editor on a simple page.
          >
          > However, I was able to narrow down the problem a bit more. I used the method "One Editor, Multiple Edit Areas" (YUI Example) as a starting point, since I possibly have lots of editable textareas on the same page. The difference to the example is that I don't use one editor with one textarea and just move this editor around but instead I got better results with destroying and recreating the editor every time the user clicks another field. Besides that, it all works really well, though.
          >
          > The trouble with the image I described earlier seems only to happen, after I left the field with the image to edit elsewhere and then return focus to this field (resulting in a new editor instance being created).
          >
          > Any ideas?
          >
          > Björn
          >
          > --- In ydn-javascript@yahoogroups.com, Dav Glass <davglass@> wrote:
          > >
          > > Can you post some sample HTML that causes the issue?
          > >
          > > Dav
          > >
          > > On Thu, 02 Jul 2009, bjoernbg wrote:
          > >
          > > > Hi,
          > > >
          > > > I have recently started to use YUI Rich Text Editor and so far have got very good results. There is one issue, though:
          > > >
          > > > Whenever I insert an image into a RTE, it works fine. However, quite often when I try to edit a previously included image (e.g. to change the alignment) the property box is not filled with the image's properties but is empty. If I then click the close button (x) of the property box, the image disappears from the text!
          > > >
          > > > This happens here on my mac in Safari 4, Firefox 3 and Opera 10...
          > > > The strange thing is that sometimes it still works...
          > > >
          > > > I hope someone can help me with this problem, it's really quite annoying.
          > > >
          > > > Best regards,
          > > > Bjoern
          > > >
          > >
          > > --
          > > 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 +
          > >
          >
        • Dav Glass
          How about filing a bug: http://yuilibrary.com/projects/yui2/newticket?component=Editor&version=2.7.0 I won t remember to fix it if there is no bug filed. Also
          Message 4 of 5 , Jul 4, 2009
          • 0 Attachment
            How about filing a bug:
            http://yuilibrary.com/projects/yui2/newticket?component=Editor&version=2.7.0

            I won't remember to fix it if there is no bug filed. Also attach a test
            case so I have something to test against.

            Dav

            On Fri, 03 Jul 2009, bjoernbg wrote:

            > Ok, I think I found the bug and a workaround.
            >
            > The problem is the following:
            > The first time I create an editor, everything works fine. After that, every time I create another editor, the function _getBlankImage in editor returns nothing!
            > I actually tracked the problem to this line:
            >
            > > if (YAHOO.widget.EditorInfo.blankImage) {
            >
            > if YAHOO.widget.EditorInfo.blankImage is not empty, then things don't seem to work... I'm not sure what exactly is happening there, so I won't try to fix this problem, but the workaround is kind of easy - every time I destroy an editor, I set YAHOO.widget.EditorInfo.blankImage to undefined and now everything works!
            >
            > Cheers!
            > Björn
            >
            >
            > --- In ydn-javascript@yahoogroups.com, "bjoernbg" <bjoernbg@...> wrote:
            > >
            > > I'm not sure what sample HTML you are talking about - I'm not using the editor on a simple page.
            > >
            > > However, I was able to narrow down the problem a bit more. I used the method "One Editor, Multiple Edit Areas" (YUI Example) as a starting point, since I possibly have lots of editable textareas on the same page. The difference to the example is that I don't use one editor with one textarea and just move this editor around but instead I got better results with destroying and recreating the editor every time the user clicks another field. Besides that, it all works really well, though.
            > >
            > > The trouble with the image I described earlier seems only to happen, after I left the field with the image to edit elsewhere and then return focus to this field (resulting in a new editor instance being created).
            > >
            > > Any ideas?
            > >
            > > Björn
            > >
            > > --- In ydn-javascript@yahoogroups.com, Dav Glass <davglass@> wrote:
            > > >
            > > > Can you post some sample HTML that causes the issue?
            > > >
            > > > Dav
            > > >
            > > > On Thu, 02 Jul 2009, bjoernbg wrote:
            > > >
            > > > > Hi,
            > > > >
            > > > > I have recently started to use YUI Rich Text Editor and so far have got very good results. There is one issue, though:
            > > > >
            > > > > Whenever I insert an image into a RTE, it works fine. However, quite often when I try to edit a previously included image (e.g. to change the alignment) the property box is not filled with the image's properties but is empty. If I then click the close button (x) of the property box, the image disappears from the text!
            > > > >
            > > > > This happens here on my mac in Safari 4, Firefox 3 and Opera 10...
            > > > > The strange thing is that sometimes it still works...
            > > > >
            > > > > I hope someone can help me with this problem, it's really quite annoying.
            > > > >
            > > > > Best regards,
            > > > > Bjoern
            > > > >
            > > >
            > > > --
            > > > 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 +
            > > >
            > >
            >
            >

            --
            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 +
          Your message has been successfully submitted and would be delivered to recipients shortly.