日期:2014-05-17  浏览次数:20689 次

jsp怎样配置FCKEditor,求指点
配置了好多遍,也查了好多资料,就是配置不出来,真的要疯了。

------解决方案--------------------
<script type="text/javascript" src="<%=request.getContextPath() %>/fckeditor/fckeditor.js"></script>
</head>
<body>
<form action=""method="post">
主题:<input type="text" name="title" size="80"><br>
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'editor1' ) ;
oFCKeditor.BasePath = '<%=request.getContextPath() %>/fckeditor/' ;
oFCKeditor.Height = 200 ;
oFCKeditor.ToolbarSet = 'MyTools';
oFCKeditor.Create() ;
</script>
<input name="submit" type="submit" value="submit" />

下载的fckeditor放在webroot下,fckeditor.js路径fckeditor/fckeditor.js


oFCKeditor.ToolbarSet = 'MyTools'; 这个调用哪个显示风格的,我这个是自己定义的,在fckeditor中可以自己配置,也可用js自带的 oFCKeditor.ToolbarSet = 'Default';