基于easyui的富文本编辑器的实现

1,1作为编辑器 可以使我们省去很多事情,方便了不少,不过,在其过程中,最好把相关的源码看一下,这样的话,才可以进行深入的研究。

1.2其实他给我们很多东西带来了灵感 如相关的打印等等

<!DOCTYPE HTML>

<html>
<head>


     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <title>新闻发布编辑</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="js/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="js/umeditor/third-party/jquery.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/umeditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/umeditor/umeditor.min.js"></script>
    <script type="text/javascript" src="js/umeditor/jlang/zh-cn/zh-cn.js"></script>
      <link rel="stylesheet" href="css/index2.css" />  
        <script type="text/javascript" src="easyui/js/jquery-1.8.2.min.js" ></script>
<script type="text/javascript" src="easyui/js/jquery.easyui.min.js" ></script>
<link href="easyui/css/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="easyui/css/themes/icon.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>编辑文本</h1>
<table>
<tr>
<td>标题</td>
<td><input  type="text" id="xw1"></input></td>

</tr>
<tr>
<td>开始时间</td>
<td><input class="easyui-datebox" style="width:100px" id="xw2"/>
              </td>
<td>结束时间</td>
<td><input class="easyui-datebox" style="width:100px"/ id="xw3"></td>
</tr>

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




<div class="clear"></div>
<table>
    <tr>
        <td>
            <button class="btn" οnclick="#"/>保存</button>
            <button class="btn" οnclick="#"/>取消</button>
        </td>
    </tr>
</table>


<div>
    <h3 id="focush2"></h3>
</div>
<script type="text/javascript">
    //实例化编辑器
    var um = UM.getEditor('myEditor');
    um.addListener('blur',function(){
        $('#focush2').html('编辑器失去焦点了')
    });
    um.addListener('focus',function(){
        $('#focush2').html('')
    });
    
</script>



</body>
</html>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值