Recommendations for an HTML-Friendly RichTextEditor for Flex & AIR? [closed]

﹥>﹥吖頭↗ 提交于 2019-12-03 08:56:30

The problem you've hit is Flash natively supports a very small subset of HTML. So any editing you do to fit the Flash player will make it render much more primitively in HTML. Personally I think the conflicting aims of editing legacy content in Flash and displaying cleanly in both Browser and Flash are going to be too difficult to resolve.

One alternative would be to write your own text layout engine, much like the team working on Buzzword did. Given it took them many months to produce their application, I suspect this is massively out of scope for your plans :)

Another, simpler alternative would be to apply a server side transformer over the HTML content to simplify it down to Flash level. This would enable you to have a richly layed out HTML document, and a simpler Flash document. However it won't help you edit it in the Flash player.

If you wanted to edit your HTML in Flash, you might be able to use the wmode + iFrame trick first mentioned by Christophe Coenraets and updated by Renaun Erickson to give yourself a dual-live preview but you are still going to have the problems with different levels of HTML support by Flash and Browser. And editing a textfield to manually edit-then-preview your content really isn't what you want to be doing.

A final option would be to investigate the newly-in-beta Text Layout Framework which would help give you some of the more extensive WYSIWYG parts of HTML. This looks a complicated but fairly feature rich. It works with Flex 3.2 / Flex 4 / Flash CS4. Of course this in beta, so may change at some point in the future.

As an aside, if you are building an AIR application, perhaps building a HTML+JS AIR application using existing JS+HTML editors such as FCKEditor would be a viable solution? Then you would just have to render for the Flash player (perhaps using a transformer approach as detailed above).

David Arno

Take a read of Display HTML in an Actionscript 3 project

It doesn't fully answer your question (as it only addresses rendering HTML in Flash), but it may prove a useful starting point.

Have you considered using one of the existing JavaScript-based rich text editors and embedding it within HTML that is hosted within your flash-based app for example?

I myself am currently investigating use of FCKeditor as a popup on pages to edit content that can be displayed in Flex component htmlwrapper .. no idea how far i will get, but that's my insight!

Have you tried html tidy? It has a standalone version and php has tidy module too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!