
摘 要: KindEditor是一套开源的在线HTML编辑器,网站开发人员可以用KindEditor把传统的多行文本输入框替换为可视化的富文本输入框,从而让网站用户获得所见即所得编辑效果。KindEditor功能齐全,使用简单,具有很强的可扩展性,而且能够兼容各种主流浏览器。KindEditor可用于动态网站和精品课程开发制作中,利用KindEditor的富媒体性,可轻松实现文本编辑以及视频、音频、图片和附件等资料的上传管理。
关键词: KindEditor; 富文本; 动态网站; 精品课程
中图分类号:TP37 文献标志码:A 文章编号:1006-8228(2015)09-45-02
Study on application of KindEditor in Web site development
Wu Daiwen
(College of Media Engineering, Weinan Normal University, Weinan, Shanxi 714000, China)
Abstract: Kindeditor is an open source online HTML editor, Web developers can use KindEditor to replace the traditional multi-line text input box with the visualized rich text input box, so that the site users get the wysiwyg editing effect. KindEditor features complete, easy to use, with a strong scalability, and can be compatible with all kinds of mainstream browsers. Kindeditor can be used to develop the dynamic Web-sites and the excellent courses, using the rich media features of kindeditor, the text editing and the upload management for video, audio, images and accessories can be easily realized.
Key words: KindEditor; rich text; dynamic Web-sites; excellent courses
0 引言
目前,Internet上各类中小型网站如雨后春笋般涌现,这些网站通常都是动态网站,动态网站通常都会有一个简单的网站后台管理系统。后台管理功能通常有新闻发布,产品发布和商品添加等。而要方便快捷地实现这些功能,通常需要一个在线HTML编辑器。常用的在线HTML编辑器有KindEditor、TinyMCE、FCKEditor、CuteEditor和eWebEditor等。本文以使用最为广泛的KindEditor为例,探讨在線HTML编辑器在网站开发中的应用。
KindEditor是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果,开发人员可以用KindEditor把传统的多行文本输入框(textarea)替换为可视化的富文本输入框[1]。
1 KindEditor在网站中的使用
要在动态网页(如asp网页)中使用KindEditor在线HTML编辑器,需要经过以下几个步骤。
⑴ 到http://kindeditor.net/网站下载KindEditor在线HTML编辑器。将下载的压缩包解压后如图1所示。KindEditor目前支持asp、jsp、asp.net和jsp等动态网页技术,因此可以在这四种动态网页中集成KindEditor在线HTML编辑器。
⑶ 在网页的表单中设计一个多行文本输入框,这里注意要将多行文本输入框的visibility属性设置为“hidden”,多行文本框代码如下[3]:……p>