3 Replies Latest reply on Jul 1, 2009 4:28 AM by JelamCDI

    RichEditableText: extend and some bugs

    Marc Speck Level 1

      I have the following question for Flex 4.0.0.7219:

       

      1. How can I assign a IFormatResolver to richtEditableText.textFlow.formatResolver?
      The RichEditableText class does not handle format resolvers. So I need to assign it directly to textFlow like:
              override protected function commitProperties():void {
                  super.commitProperties()
                  textFlow.formatResolver = new CustomFormatResolver()
              }
             
      I think dispatching an event when the instance of textFlow changes was an improvement over this hack. The event also allows for perfomance improvements in custom components that use RichtEditableText.

       

      2. Is supporting html import/export on the roadmap?

       

      3. Bug 1: Export ignores spaces:
          <ns:RichEditableText
              id="spaceEditor"
              text=" hallo "
              />
             
              spaceEditor.export.toString() should render "...<span> hallo </span>..." but does "...<span>hallo</span>..."

       

      Fix: Use XML.ignoreWhitespace = false; etc as describe in http://forums.adobe.com/thread/230089 . Though maybe the TLF team might fix it in their code: http://forums.adobe.com/message/2030394#2030394 .

       

      4. Bug 2: Setting the content causes a second return.
      5.1 Set e.g. <ns:RichEditableText content="hallo" /> (content=<TextFlow .... </TextFlow> has the same effect)
      5.2 Click into the richEditableText and add a return on your keyboard.
      5.3 Effect: there are 2 returns. The result of an export is "...<p><span></span></p><p><span></span></p>..." instead of "...<p><span></span></p>..."

       


      5. Bug 3: richEditableText.autosize="true";richEditableText.percentWidth=100; is broken but there was a refactoring since 4.0.0.7219. So I hope the current build is working...

       

      If somebody confirms the bugs, I'll file them.
      Marc

        • 1. Re: RichEditableText: extend and some bugs
          GordonSmith Level 4

          1. Please file an enhancement request asking that this be made easier.

           

          2. TLF's TextFilter class supports importers and exporters for HTML_FORMAT, but I haven't tried them and don't know how robust they are.

           

          3. I'm aware of this bug but I'm not sure a bug has been filed for it. Could you please file one?

           

          4. Ditto with 3.

           

          5. I'm not aware of this. Please be sure to file a bug.

           

          BTW, there is a another major refactoring coming this week. Adobe's Platform API Review Board has reviewed all new Spark APIs and suggested a number of changes.

          • 2. Re: RichEditableText: extend and some bugs
            Marc Speck Level 1

            Thanks Gorden, I created some work for you

             

            1. Please file an enhancement request asking that this be made easier.

               

            http://bugs.adobe.com/jira/browse/SDK-21838

             

            2. TLF's TextFilter class supports importers and exporters for HTML_FORMAT, but I haven't tried them and don't know how robust they are.

               

            I think the HTML export in TLF is not yet stable. The thing is that once

            it is stable there is pretty much no way to insert the import

            functionality into RichEditableText without rewriting most of the

            component. In my opinion, it should be either integrated into

            RichEditableText even at this early stage or RichEditableText should be

            refactored to allow extending it in an easier way.

             

             

            3. I'm aware of this bug but I'm not sure a bug has been filed for it. Could you please file one?

               

            http://bugs.adobe.com/jira/browse/SDK-21834

             

            4. Ditto with 3.

               

            http://bugs.adobe.com/jira/browse/SDK-21836

             

            5. I'm not aware of this. Please be sure to file a bug.

               

            http://bugs.adobe.com/jira/browse/SDK-21837

             

            BTW, there is a another major refactoring coming this week. Adobe's Platform API Review Board has reviewed all new Spark APIs and suggested a number of changes.

               

            Thanks for the insight, I appreciate.

            Marc

            • 3. Re: RichEditableText: extend and some bugs
              JelamCDI

              I have same problem with extending RichEditableText. I want to add image to this control using content property as well text. I m looking for solution of your bugs so I can come out from two para tag at time of image insertion as well text insertion.