10 Replies Latest reply on Nov 10, 2010 1:19 PM by Claudiu Ursica

    TINYMCE on Flex


      Hello, it is possibile use editoer text TINYMCE (http://tinymce.moxiecode.com/) on Flex?

        • 1. Re: TINYMCE on Flex

          You can use basically any text editor(notepad++,UltraEdit),but my advice is to use Flash Develop.It's free and it has great code completition(better than Flash Builder),debugger,the only thing it's lacking is visual editor.Anyway it's a great tool.

          • 2. Re: TINYMCE on Flex
            JeffryHouser Level 4

            I think the OP meant he wants to use TinyMCE as part of a Flex App; not build Flex apps using TinyMCE.


            My answer is: sort of.


            You can't use TinyMCE (which is a JavaScript component) as part of a Flex/Flash App.  But, you can use the iFrame trick to hover TinyMCE over the Flex app.



            It may be possible to convert TinyMCE to Native ActionScript, but I doubt it wold be trivial.

            • 3. Re: TINYMCE on Flex
              Claudiu Ursica Level 4

              Personally I have IFrames (along with other old html elements but that is a

              different topic). I integrated Flex with CKEditor (http://ckeditor.com/) and I

              did not used I frame. I had an overlay div inside the wrapper html page who

              cover the flex application (set to invisible). I used ExternalInterface to call

              Javascript to create the editor show the editor iside the overlay div, edited

              the text and then using a callback pass it back to flex. The application was a

              backend admin for a website so the text needed to be XHTML text. Worked like a

              charm. However you need to escape some chars when sending to JS there is a known

              issue with that.




              • 4. Re: TINYMCE on Flex
                JeffryHouser Level 4

                You "have" iFrames?  Or you "Hate" iFrames?



                It sounds like you're using the iFrame trick approach with a div.

                • 5. Re: TINYMCE on Flex
                  Claudiu Ursica Level 4

                  Hate sorry for the typo , my bad is kind of late I should go to bed...


                  • 6. Re: TINYMCE on Flex
                    Claudiu Ursica Level 4

                    The trick is really ok, is the HTML Iframe I have a problem with :).


                    • 7. Re: TINYMCE on Flex
                      JeffryHouser Level 4

                      I'm curious as to why.


                      I did some Googling, and it appears that div was introduced before iFrame; which makes your complaint about "old" HTML Elements seem a bit odd.

                      • 8. Re: TINYMCE on Flex
                        Claudiu Ursica Level 4

                        It is obviously I did not put the words right, sorry for that again. I've done

                        my share of Front end development and will still probably do it in the future...

                        2 of the things that we had really issues with were Frames (as in framesets

                        iFrame). Bookmarking, navigation, the fact that content gets indexed separate by

                        search engines, iframes don't re-size well with the content, etc... Again I have

                        stated it wrong. Most of the HTML tags are old they appear with the language

                        itself. I frames because of the headaches I had with them in the past and

                        wherever possible try to stay away from them. There are cases when they are

                        implemented successfully. Seen them used for accessing cross domain content, you

                        can still make use of the CDN. However for small static content you can bypass

                        it through a flash proxy object still get the cross domain part and also put

                        only white-list of allowed domains in there. For me the general rule of thumb is

                        avoid them if you can. Sometimes you have to deal with them. The nice part about

                        flash player is it looks the same in all browsers you don't have have to worry

                        about your content looking different. Unfortunately when it comes to a WYSIWYG

                        editor flash/flex do not match with the javascript already existing ones.

                        Fortunately the trick works and they can be use both. I just choose to skip the

                        IFrame and implement the div. I think div also renders and loads faster if I

                        remember correctly. Divs are here to stay, frames and Iframes are seen as a

                        thing of the past, hence the old in my previous statement. Hope I din not

                        sounded like an exclusivist or something like that. I like to consider options

                        as wider as possible and even though flash/flex is my favorite "weapon" there

                        are cases when good old plain HTML works better for the given situation. But i

                        think I am getting away from the initial issue, sorry if I am spamming...



                        • 9. Re: TINYMCE on Flex
                          z.cristiano Level 1

                          Thank you, but how i can use this TINYMCE on Flex?


                          It is possibile or no?

                          • 10. Re: TINYMCE on Flex
                            Claudiu Ursica Level 4

                            Set it up as if you;d use it in HTML and make the call from flex to the

                            javascript tinyMCE.init(); (pass additional text if you need to edit anything)

                            The you display it over your flex app. Upon saving you pass the text back to

                            flex and close MCE, hide html overly/iframe and you are done.