zoukankan      html  css  js  c++  java
  • 页面可视化编辑ckeditor(web基础学习笔记十五)

    一、CKedit下载ckedit

    下载地址:http://ckeditor.com/

    二、ckedit的引入

    2.1、解压并将ckedit复制到项目中

    2.2、在页面中引入

    在页面头部加入

    <script type="text/javascript" src="<%=request.getContextPath()%>/ckeditor/ckeditor.js"></script>

    2.3、在需要使用ckedit的标签中添加class="ckeditor"

    多行文本域添加class

    tr>
        <td>内容</td>
        <td>
        <textarea id="newscontent" name="newscontent" class="ckeditor" rows="8"></textarea>
        </td>
    </tr>

    2.4、页面全部代码

    <%@ 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">
    <script type="text/javascript" src="<%=request.getContextPath()%>/ckeditor/ckeditor.js"></script>
    <title>Insert title here</title>
    </head>
    <body>
    <table >
    <tr>
        <td>标题</td>
        <td><input type="text" name="title" value=""/></td>
    </tr>
    <tr>
        <td>内容</td>
        <td>
        <textarea id="newscontent" name="newscontent" class="ckeditor" rows="8"></textarea>
        </td>
    </tr>
    </table>
    
    </body>
    </html>

    2.5、页面效果

  • 相关阅读:
    Shell 基础
    史上最全储能系统优缺点梳理
    IEEE文章分类
    【能源常识】如何理解“电力电量平衡”
    最优化基础(五)
    最优化基础(四)
    json
    python基础知识之zip
    Python sendmail
    指定的结尾换行
  • 原文地址:https://www.cnblogs.com/liunanjava/p/4261368.html
Copyright © 2011-2022 走看看