My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

this is the light web editor,this's useful for web 2.0.

the demo url:jeditor demo

简要文档:

1.JEditor类构造方法参数:target,width,height;

target:为目标form表单元素 width:为编辑区域宽度 height:为编辑区域高度

2.属性列表

status:boolean类型,状态.如果为false,可能编辑器处于上传状态,请在表单提交前检查此状态

3.方法列表

setValue():设置初始化编辑区内的代码.必须为HTML代码.

getValue():返回编辑区内容.
insertImage(src,width,height,align,alt):src为图片路径,width为图片宽度,height为图片高度,align为图片对齐方式,alt为图片的alt属性.
insertText(str):在编辑器当前光标位置插入str字符串.
insertHTML(html):在编辑器当前位置插入html代码.

实例代码:

<script LANGUAGE="JavaScript">

var je = new JEditor('editor1',500,300);

je.setValue('testing');

</script>

Powered by Google Project Hosting