kindeditor使用

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<link rel="stylesheet" href="js/kindeditor-4.0.4/themes/default/default.css" />

	<script charset="utf-8" type="text/javascript" src="js/kindeditor-4.0.4/kindeditor.js"></script>
	<script charset="utf-8" type="text/javascript" src="js/kindeditor-4.0.4/lang/zh_CN.js"></script>
	<script charset="utf-8" type="text/javascript" src="js/jquery-1.4.2.min.js" ></script>
	<script charset="utf-8" type="text/javascript">
			var editor;
		    KindEditor.ready(function(K) {
		    	//自定义
		    	//kingIFrame 3735 
		            editor = K.create('#editor_id',
					{ items:['source', 'fullscreen','preview', '-','undo', 'redo', 'print', 'cut', 'copy', 'paste',
					  'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright','quickformat',
					    
					  'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
					  'superscript', '|', 'selectall','fontname', 'fontsize', '|', 'textcolor', 'forecolor', 'bold',
					  'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image',
					  'flash', 'media', 'advtable', 'hr', 'emoticons', 'link', 'unlink', '|', 'map','about'],
					  colorTable:[
					              ['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'],
					              ['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'],
					              ['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'],
					              ['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000']
					      ],
		            afterFocus:function(e){
		            	//alert(e);
		            	
		            },
		            allowFileManager:false,		//true时显示浏览远程服务器按钮。
		            allowMediaUpload:false,		//true时显示视音频上传按钮。
		            allowFlashUpload:false,		//true时显示Flash上传按钮
		            allowImageUpload:true,		//true时显示图片上传按钮。默认是true
		            resizeType:1,
		            useContextmenu:false,               //是否需要浏览器默认的右键菜单 false是不可以,表示输入框中的右键
		            uploadJson:"FileUpload",
		            fileManagerJson:"",
		            allowFileManager : true,
		            afterUpload : function(url) {
                        alert(url);
                	}
						
					});
		    });
			
	</script>
</head>
<body>
<textarea id="editor_id" style="width:700px;height:300px;"></textarea>eeeee
dialog 里面不能获取外面的对象了,要通过$(".ke-dialog-body #subHotelName").val()才能获取subHotelName对象的值
</body>
</html>

你可能感兴趣的:(kindeditor)