HTML and rich text editing in Flex/Flash

User: Admin
Date: 5/22/2009 5:43 pm
Views: 869
Rating: 17    Rate [

+

|

-

]

HTML support in Flex is limited

The standard HTML components in the current Flex SDK (version 3) are very limited, any attempt to display for instance a webpage inside the HTML component will most definitely fail.

Almost the same can be said about the Richtext component, which doesn't even support tables.

Coming from the Lotus Notes / Domino world trying to evangelise the idea of developing front-ends for Domino database, this causes a serious problem. 

Notes provides rich text support, but badly designed

Though the underlying CD record format of Notes richt text as well as the rendering engines are...well...let's say somewhat unique (in matter of fact I would call them pretty much flawed), Notes rich text fields nevertheless provide a formidable tool to create indeed rich text content in documents stored in Notes databases.

If one intends to develop a Flex front-end for Domino, this problem has to be solved. At the present time we are still researching the best way forward.

Possible solutions

  1. Flex SDK 4 (code name Gumbo)

    Adobe's Flash Player 10 and the Flex SDK 4 provide new and richer features to render HTML. However, as the new Flex Builder 4 (now called Flash Builder) is not even in public beta, one can only try out these new features using the respective ActionScript classes.

    I have not yet experimented with using the SDK 4 with Flex Builder 3, so I can't say whether the combination of the new SDK 4 with Flex Builder 3 will work (without major issues) and if, how these new (enhanced) HTML classes work.

    Adobe Flex 4 (Gumbo)

    Flex 4 SDK downloads
  2. Free iFrame component

    There is free iFrame component available on code.google.com, which allows to display almost any website within a Flex application.

    However, this component has serious limitations. The one that rendered this component more or less useless to me is that it can't be used in popup dialogs using the Flex PopupManager class.
  3. HTML component from Drumbeat Insight

    During my research I came across Drumbeat Insight's HTML component, which does the trick. If my understanding is correct it is too based on iFrame, however, all the limitations I faced with the iFrame component found on Google do not exist with this component.

    I managed to display so far any website I tried with almost 100% fidelity inside my Flex applications, including in popup dialogs.

    In addition the component allows loading for instance the FCKEditor (free and open source HTML editor). And the latter is what we are after. Because with the FCKEditor we have a means of editing Notes rich text. Well it least in theory. I'm still working on a sample that I can publish here.

    The only difficulty I found was getting the demos to work. Apparently it is not that straight forward. I had to follow the online instructions to the letter. Having said this, once I did, I had no further problems whatsoever. just did what most developers do most of the time...skipping the manuals and instructions...and just hack whatever looks right into the keyboard. But what works well most of the time, just did not in this case. So just be warned, save your time and nerves by following the instructions.

    Next is to get my own projects to work with the FCKEditor. As soon as I'm there I will post it here. Of course I will not be able to include the component into the code I'm going to publish as the HTML component itself doesn't come for free.

    Having said this, it comes at very reasonably price and with a quite flexible license model. It is also possible to purchase an OEM license, though this possibility is not mentioned on the Drumbeat website.

    One last comment: unfortunately one cannot download an eval copy and try things before purchasing the component. However, the online demos are very comprehensive.
Reply

Replies

Nested
PreviousBackNextAdd