一个HTML友好的使用RichTextEditor针对Flex和放大器的建议;空气? [英] Recommendations for an HTML-Friendly RichTextEditor for Flex & AIR?

查看:123
本文介绍了一个HTML友好的使用RichTextEditor针对Flex和放大器的建议;空气?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为一个方面的项目,对于有趣,我重写我的博客和CMS的Flex和AIR分别,而我是pretty的好满意的设计方案迄今,一个主要的痛点遗体有工作(这是说上执行CRUD操作)遗留的HTML内容和体面渲染HTML内容在浏览器和Flash播放器。当然,我可以用即开即装即用的使用RichTextEditor和TextArea控件,但都倾向于呛上显示和操作简单的标记(例如,单个或缺席报价的属性,形象定位等),内容是默认情况下生成,而在Flash播放器呈现精美的,通常看起来可笑的浏览器 - 一个重要的因素对我来说,因为我想继续发布RSS

As a side project, for "fun," I'm rewriting my blog and CMS in Flex and AIR respectively, and while I'm pretty well satisfied with the design thus far, the one major pain point remains working with (which is to say performing CRUD operations on) legacy HTML content, and rendering that HTML content decently in both the browser and the Flash player. Sure, I can use the out-of-the-box RichTextEditor and TextArea controls, but both tend to choke on displaying and manipulating simple markup (e.g., single or absent quotes on attributes, image alignment, etc.), and the content it generates by default, while beautifully rendered in the Flash player, usually looks ridiculous in the browser -- an important factor to me, since I'd like to continue publishing RSS.

我知道有一对夫妇使用RichTextEditor衍生物在那里,但标题下的道路,任何人之前,或向下手动操纵内容的替代道路,我想我会查询该集团在这里第一次,看到是否有人以前也解决了这个问题;现在看来似乎已经是一个相当常见的使用案例。

I know there are a couple of RichTextEditor derivatives out there, but before heading down the road with any of them, or down the alternative road of manipulating the content manually, I figured I'd poll the group here first, to see whether anyone's tackled this problem before; it seems like it has to be a fairly common use case.

在此先感谢您的见解!

推荐答案

这个问题你已经打是Flash本身支持的 HTML 非常小的子集。因此,任何编辑,你做的,以适应Flash播放器将使其呈现更primitively在HTML中。我个人认为在Flash中编辑的旧内容,并在这两个浏览器中显示干净和Flash的相互冲突的目标将是太难解决。

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.

一种选择是写自己的文字排版引擎,很像团队工作 Buzzword的一样。鉴于他们花了好几个月来生产自己的应用程序,我怀疑这是大量超出范围的计划:)

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 :)

另一种更简单的选择是应用服务器侧变压器在HTML内容,以简化它下降到闪存级。这将使你有一个丰富奠定了HTML文档,一个简单的Flash文档。然而,它不会帮助你在Flash播放器进行编辑。

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.

如果你想编辑HTML在Flash中,你也许能够使用的wmode +的iFrame招首先由克里斯托夫Coenraets提及和的由Renaun埃里克森更新来给自己一个双活preVIEW,但你仍然要面临的问题有不同程度的HTML支持由Flash和浏览器。和编辑一个文本框手工编辑,则 - preVIEW你的内容真的不是你想要做什么。

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.

最后一个选择是将调查新的-β  文本布局框架这将有助于给你一些HTML的更广泛的所见即所得部分。这看起来复杂,但相当丰富的功能。它的工作原理使用Flex 3.2 / 4的Flex / Flash的CS4。当然,这在测试阶段,所以可能会改变在未来的某个时候。

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.

顺便说一句,如果您正在构建一个AIR应用程序,可能建立使用现有的JS + HTML编辑器如FCKEditor的将是一个可行的解决方案,一个HTML + JS AIR应用程序?然后,你就只需要渲染的Flash播放器(可能使用详见上文变压器的方法)。

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).

这篇关于一个HTML友好的使用RichTextEditor针对Flex和放大器的建议;空气?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆