zoukankan      html  css  js  c++  java
  • 富文本的使用-KindEditor

    需要使用富文本,推荐一款小巧方便的工具KindEditor

    官方简介

    KindEditor 是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果,开发人员可以用 KindEditor 把传统的多行文本输入框(textarea)替换为可视化的富文本输入框。 KindEditor 使用 JavaScript 编写,可以无缝地与 Java、.NET、PHP、ASP 等程序集成,比较适合在 CMS、商城、论坛、博客、Wiki、电子邮件等互联网应用上使用。

    官方网址: http://kindeditor.net/about.php

    效果图

    这里写图片描述

    下载文件

    下载最新版本的包,我下的是KindEditor 4.1.1,然后放到自己的工程下面,如图:

    目录结构

    代码使用

    分三步:
    1. html
    2. 引入标签库
    3. js

    1. html代码

    <span class="w-fabu-lable2">房源详情:</span>
      <textarea class="detail" id="houses.detail" name="houses.detail" style="700px;height:300px;">           
    </textarea> 

    2. 引入标签库

    <!--富文本-->
        <script charset="utf-8" src="../public/js/kindeditor/kindeditor.js"></script>
        <script charset="utf-8" src="../public/js/lang/kindeditor/zh-CN.js"></script>

    3. js

     <script>
       KindEditor.ready(function(K) {
       window.editor = K.create('.detail');
    });
    </script>
  • 相关阅读:
    idea自定义servlet模板
    jsp基础-指令,内置对象,动作,EL表达式,JSTL技术
    cookie和session
    HttpServletRequest
    IO字符流
    IO字节流
    递归
    File 类
    JDBC数据库连接
    Map接口
  • 原文地址:https://www.cnblogs.com/shuiyj/p/13185259.html
Copyright © 2011-2022 走看看