当前位置: 代码迷 >> Web前端 >> Fckeditor的施用(二):Fckeditor对象的属性
  详细解决方案

Fckeditor的施用(二):Fckeditor对象的属性

热度:38   发布时间:2012-11-23 22:54:33.0
Fckeditor的使用(二):Fckeditor对象的属性
? Fckeditor对象的属性
属性名 默认值 描述
Width 宽度 100%
Height 高度 200
Value 编辑器初始化的内容 (空字符串)
ToolBarSet 工具条集合的名称(内置有Default和Basic,也可以自己定制) Default
BasePath 编辑器的基路径 /fckeditor/

?

?

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<html>
? <head>
??? <title>My JSP 'index.jsp' starting page</title>
? </head>
? ??? <script type="text/javascript" src="fckeditor/fckeditor.js"></script>
? ??? <script type="text/javascript">
??? ??? var oFCKeditor = new FCKeditor('FCKeditor1');
??? ??? oFCKeditor.BasePath = "<%=request.getContextPath()%>/fckeditor/";
??? ??? oFCKeditor.Width = "400";
??? ??? oFCKeditor.Height = "50%";
??? ??? oFCKeditor.Value = "default"
??? ??? oFCKeditor.Create();
??? </script>
??? <script type="text/javascript">
??? ??? window.onload = function() {
??? ??? ??? var oFCKeditor = new FCKeditor( 'MyTextarea' ) ;
??? ??? ??? oFCKeditor.BasePath = "<%=request.getContextPath()%>/fckeditor/" ;
??? ??? ??? oFCKeditor.ReplaceTextarea() ;
??? ??? }
??? </script>
???
? ???
? <body>
??? This is my JSP page. <br>
??? <textarea rows="4" cols="60" name="MyTextarea" style="display:none">default</textarea>
? </body>
</html>

  相关解决方案