HTML Javascript富文本框(IDE) [英] HTML Javascript Rich Text Box (IDE)

查看:190
本文介绍了HTML Javascript富文本框(IDE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在javascript中构建一个IDE,其行为与gmail非常相似,只是样式会根据键入的内容自动更改。这个逻辑不是我在挣扎的地方。它的gmail如何实现在HTML中以丰富的编辑格式进行编辑的能力。据我所知,textarea控件无法以这种方式工作,那么它们是如何伪造这种功能的呢?

解决方案

内容可编辑
尝试在Firefox中按F7直接编辑HTML页面)
Gmail在contenteditable =true的页面中使用Frame。



另请参阅Google Web Toolkit:
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google- web-toolkit-doc-1-5& t = DevGuideWidgetGallery
有RichTextArea小部件。


I am hoping to build an IDE in javascript that behaves much like gmail except the style will change automatically based on what they type as they type. The logic for this isnt where im struggling. Its how gmail achieves the ability to edit in a rich edit format in html. As far as I know the textarea control does not work this way, so how do they fake this functionality?

解决方案

Google for "content editable" Try to press F7 in Firefox end edit HTML page directly :) Gmail uses Frame inside a page with contenteditable="true".

See also Google Web Toolkit: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideWidgetGallery There is RichTextArea widget.

这篇关于HTML Javascript富文本框(IDE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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