6 Replies Latest reply on Apr 30, 2008 11:43 AM by slaingod

    Can and how can i add image to richtexteditor

    schoolworkwork
      Hi:
      I am making a flex application which can let user write book, as you know book consists some chapters, etc. in chapter which has text and probably image also. I already import the richtexteditor into my application, and i want to add image in chapters, so that is really like a book(text and image). i did a lot of research from internet about this problem, but i get nothing. anyone so kind to help how can i add image to an richtexteditor? or any one has custom richtexteditor which provide this function, or any idea to solve this problem.

      Thank you soso much!
      schoolworkwork
        • 1. Re: Can and how can i add image to richtexteditor
          BelAus
          I would love to see some sort of Insert Image integrated with the RTE as well!
          • 2. Re: Can and how can i add image to richtexteditor
            flashharry! Level 1
            HI,


            I might be simplifying this but a RTE take html and you can just use a link

            <RichTextEditor id="RTE"/>

            RTE.htmlText = "<img src='/images/myimage.gif' width='100%'/>";
            or
            RTE.htmlText = "<img src=' http://myserver.com/images/myimage.gif' width='100%'/>";

            Tested and loaded an image from my server in to the RTE

            Dean
            • 3. Re: Can and how can i add image to richtexteditor
              BelAus Level 1
              The target audience I had in mind has no (and should not) have any idea how to insert HTML into their text editor.
              • 4. Re: Can and how can i add image to richtexteditor
                flashharry! Level 1
                ok,

                Provide them a file button, or text input for them to type in the path.

                With a file browse you would have to send it to the server first and then link. with a text input you could have the user type in the path and yu could use
                <img src='file:///mypath/to/myfile' />

                but once you have the file reference you could append the image tag to the RTE input.

                If you wanted to add an AIR app as well you could use file drag and drop and a local net connection between the AIR swf and the browser swf and pass the file that way.
                dean
                • 5. Re: Can and how can i add image to richtexteditor
                  BelAus Level 1
                  Hi Dean, I actually wish the flex RTE control has an "Insert Picture" control as part of the control without me having to do anything specific. I am still tossing up whether the system I am designing will be developed as a Flex/Rails app or just a plain Rails app. FCKeditor or TinyMCE are the examples I am looking at. Are there people from Adobe on this forum? Are there any plans to have a decent WYSIWYG editor control as part of the standard Flex controls any time soon?
                  • 6. Re: Can and how can i add image to richtexteditor
                    slaingod Level 1
                    Soon, I doubt it. There is some discussion that FB4 will have improved HTML support built-in (possible tables?) for its htmlText support. I would also assume there might be improvements to the RTE component in that case, but that certainly won't be this year.

                    That said, it really isn't Adobe's job to make a WYSIWYG component for everyone's needs. FCKEDitor and TinyMCE are larger than the entire Flash player install. Just as FCKEditor and TINYMCE weren't released by the W3C and aren't part of the HTML standard components, there are certainly exisiting 3rd party Flash or Flex components out there that serve this need (perhaps commercially). And it would be fairly trivial to simply copy the RTE control to your project, change the package name and add the insert image button as mentioned. (Getting it to align the way you want might be an issue.)