`
jayghost
  • 浏览: 429475 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

CKEditor初体验

    博客分类:
  • Web
阅读更多

1.Download the ckeditor.zip file from http://ckeditor.com/, decompress to WebRoot, we can delete _samples,  _source folder and some language js file in lang.

2.Use this code in index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
request.setCharacterEncoding("utf-8");	
String ckeditorContent = request.getParameter("ckeditor");
%>
<%=ckeditorContent%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<script type="text/javascript" src="ckeditor/ckeditor.js"></script>

		<title>My JSP 'index.jsp' starting page</title>
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	</head>

	<body>
		<form action="index.jsp" method="post">
				<textarea cols="80" id="ckeditor_kama" name="ckeditor"
					rows="10">Hello World!</textarea>
					<script type="text/javascript">
					CKEDITOR.replace('ckeditor_kama',
						{
							//extraPlugins:'uicolor',
							//toolbar:[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink'],['UIColor']],
							uiColor:'#CCE8CF',
							skin:'kama'
						});
					</script>
				<input type="submit" value="submit" />
		</form>
	</body>
</html>

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics