4 Replies Latest reply on Sep 7, 2010 1:19 PM by chris.campbell

    AIR + TextArea + local Image

    MrTom85

      Hey everyone,

      I'm new in this Forum and hope that I'll find some help here.
      I have the following problem:

      In my AIR-Application there is a modified WYSIWYG-Editor to create HTML-Content. Everything works fine but I'm not able to display graphics in this textarea. After some research I found the following:

      Adobe® Flex™ 3 Language Reference -> Textfield -> htmlText -> img-Tag

      "For AIR content in the application security sandbox, AIR ignores img tags in HTML content in ActionScript TextField objects. This is to prevent possible phishing attacks".

      Do you think there is still a chance to get the pictures into the textarea?

      I also found a workaround for the HTML-Component, but I'm not able to transfer it to my problem. Here is the command:
      browser.htmlLoader.placeLoadStringContentInApplica tionSandbox = true;
      (browser is the HTML-Component)

      Hopefully someone knows what to do

      Thanks,
      Tom

        • 1. Re: AIR + TextArea + local Image
          adobe_paul Adobe Employee

          The placeLoadStringInApplicationSandbox property only applies to the HTMLLoader class (or the Flex HTML component, which wraps HTMLLoader).

           

          If you are trying to use any other Flex component that uses a standard ActionScript TextField under the covers for text display, there is no corresponding way to designate that the htmlText content should be treated as application sandbox content.

          • 2. Re: AIR + TextArea + local Image
            MrTom85 Level 1

            Am I right in assuming that every Flex/AIR TextField is based on a standard Actionscript TextField?

            So do you have any idea how to implement something like that?

            Do you think creating a TextField in AS3 instead of using the <mx:TextField /> would be helpful?

             

            I'm not really sure about that, because in the AS class of the Flex Textfield there is nothing, which says "no img-tag". It extends the standard TextField of AS. I was hoping to override simply one of the methods but there is nothing to override in the Flex AS class of a TextField. So there must be something in the standard TextField class which causes the problems, right?

             

            Thanks a lot for helping,

            Tom

            • 3. Re: AIR + TextArea + local Image
              DachFlach Level 1

              Did anyone ever get any closer to a solution for this?

              • 4. Re: AIR + TextArea + local Image
                chris.campbell Adobe Employee

                Moved thread to the Adobe AIR Development forum