umeditor使用记录

论坛 期权论坛 脚本     
匿名技术用户   2020-12-29 06:30   28   0

umeditor使用记录:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'demo1.jsp' starting page</title>
    
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">    
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">
 -->
  <link href="resources/umeditor/css/umeditor.css" type="text/css" rel="stylesheet">
 <script type="text/javascript" charset="utf-8" src="resources/js/jquery-1.7.2.js"></script>
    <script type="text/javascript" charset="utf-8" src="resources/umeditor/editor_api.js"> </script>
 <script type="text/javascript" charset="utf-8" src="resources/umeditor/umeditor.config.js"></script>
    <!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="resources/umeditor/lang/zh-cn/zh-cn.js"></script>
 

  </head>
  
  <body>
  
  
<h1>UMEDITOR 完整demo</h1>

<!--style给定宽度可以影响编辑器的最终宽度-->
<script type="text/plain" id="myEditor" style="width:700px;height:240px;">
    <p>这里我可以写一些输入提示</p>
</script>


<script type="text/javascript">
    //实例化编辑器
    var um = UM.getEditor('myEditor');
</script>

    
  </body>
</html>

引入文档结构:


修改editor_api.js文件(的引入文件基本路径)如下:





分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP