Extjs之旅-HtmlEditor编辑器

<%@ 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>
<base href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/"/>
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="shared/example.css" />
<script type="text/javascript" src="js/ext/ext-all.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
Ext.onReady(function(){
 Ext.QuickTips.init();
 //创建表单
 Ext.create('Ext.form.Panel',{
	 title:'Ext.form.field.HtmlEditor实例',
	 renderTo:'form',
	 bodyPadding:5,
	 frame:true,
	 height:400,
	 width:800,
	 items:[{
		 xtype:'htmleditor',
		 height:300,
		 width:780,
		 value:'Extjs之旅',
		 labelWidth:70,
		 labelSeparator:':',
		 createLinkText:'创建超链接',//创建超链接的提示信息
		 defaultLinkValue:'http://www.',//链接的默认格式
		 enableAlignments:true,//启用左中右对其按钮
		 enableColors:true,//启用前景色,背景色选择按钮
		 enableFont:true,//启用字体选择按钮
		 enableFontSize:true,//启用字体增大缩小按钮
		 enableFormat:true,//启用粗体,斜体,下划线按钮
		 enableLinkes:true,//启用创建连接按钮
		 enableLists:true,//启用列表按钮
		 enableSourceEdit:true,//启用源代码编辑按钮
		 fontFamilies:['宋体','隶书','黑体']//字体列表
	 }]
 });
});
</script>
</head>
<body>
<div id="form"></div>
</body>
</html>

 
Extjs之旅-HtmlEditor编辑器_第1张图片
 

你可能感兴趣的:(ExtJs,htmleditor)