CKEditor4.x && JSP
官网下载CKEditor,可选Basic, Standard, Full
解压放置其WebRoot下



JSP中引入以下文件:

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="ckeditor/config.js"></script>
有以下几种方法可实现CKEditor
一:通过设置class样式
<textarea class="ckeditor" name="editor1"></textarea>

二:使用JS代码

$(document).ready(function(){
CKEDITOR.replace('entity_content'); //entity_content为textarea元素ID
});
三:使用jquery
使用jquery之前一定要先引入jquery文件,另外还要引入ckeditor/adapters下的一个jquery.js
(两者不一样,务必要引入)
$(document).ready(function(){
$('textarea#editor1').ckeditor();
});

另外配置config.js以满足自己的项目需求。

CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
// For the complete reference:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config // The toolbar groups arrangement, optimized for a single toolbar row.
config.toolbarGroups = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'forms' },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'styles' },
{ name: 'colors' },
{ name: 'tools' },
{ name: 'others' },
{ name: 'about' }
]; // The default plugins included in the basic setup define some buttons that
// we don't want too have in a basic editor. We remove them here.
config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript'; // Let's have it basic on dialogs as well.
config.removeDialogTabs = 'link:advanced';
};

根据需要  具体配置查阅其他资料

PS:需要注意的是路径问题,在引入js的时候 如果ckeditor放在了WebRoot根目录下。
src应该是src="ckeditor/ckeditor.js" ,不能为src="/ckeditor/ckeditor.js"

CKEditor4.x部署和配置的更多相关文章

  1. Tigase XMPP Server在CentOS部署和配置

    Tigase XMPP Server在CentOS部署与配置 作者:chszs,转载需注明.博客主页:http://blog.csdn.net/chszs 以下讲述Tigase XMPP Server ...

  2. web缓存服务器varnish-4.1.6的部署及配置详解

    web缓存服务器varnish-4.1.6的部署及配置详解 1.安装varnish4.1.6安装依赖 yum install -y autoconf automake jemalloc-devel l ...

  3. 【转】mysql8.0 在window环境下的部署与配置

    [转]mysql8.0 在window环境下的部署与配置 今天在阿里云window服务器上配置mysql环境,踩了一些坑,分享出来.需要的朋友可以看看.额,或许有人要吐槽我为什么不在linux上去配置 ...

  4. Zookeeper集群部署与配置(三)

    在上一篇博客中我们讲解了<Zookeeper的单机配置>,此篇博客将继续介绍Zookeeper的集群部署与配置. 环境 集群配置的环境与单机配置的环境相同,唯一不同的就是集群是在多台服务器 ...

  5. (原创)OpenStack服务如何使用Keystone (二)---部署和配置Keystone中间件

    (一)Keystone端的操作 (二)如何在OpenStack服务上部署Keystone中间件 (三)详细配置keystonemiddleware 部署OpenStack时一般先安装Keystone服 ...

  6. Storm 系列(三)Storm 集群部署和配置

    Storm 系列(二)Storm 集群部署和配置 本章中主要介绍了 Storm 的部署过程以及相关的配置信息.通过本章内容,帮助读者从零开始搭建一个 Storm 集群. 一.Storm 的依赖组件 1 ...

  7. Office Online Server 2016 部署和配置

    Office Online Server 2016 部署和配置https://wenku.baidu.com/view/65faf8de846a561252d380eb6294dd88d1d23d45 ...

  8. ide的tomcat的部署和配置

    关于intellij ide的tomcat的部署和配置   1.下载zip版的Tomcat 7,并解压.下载地址 2.在IDEA中配置Tomcat 7 在idea中的Settings(Ctrl+Alt ...

  9. Win10上部署Apollo配置中心

    基于Docker在Win10上部署Apollo配置中心 https://www.jianshu.com/p/a1215056ce75 http://nobodyiam.com/2016/07/09/i ...

随机推荐

  1. 在VirtualBox安装OS X 10.10

    下面将指导介绍了如何引入自由和强大VirtualBox安装在虚拟机上OS X Yosemite 10.10 法律免责声明:本指南旨在说明如何在定期购买的苹果电脑上创建一个虚拟机执行真正的Mac OS ...

  2. [CLR via C#]1.4 执行程序集的代码

    原文:[CLR via C#]1.4 执行程序集的代码 1. 托管程序集同时包含元数据和IL.IL是与CPU无关的机器语言.可将IL是为一种面向对象的机器语言. 2. IL也是能使用汇编语言来写的,M ...

  3. UVA - 817 According to Bartjens

    Description  According to Bartjens  The wide dissemination of calculators and computers has itsdisad ...

  4. C++11 virtual函数学习笔记

    #include<iostream> #include<string> using namespace std; class Base { public: Base(){} ~ ...

  5. .net 伪静态、真静态 (mvc)

    MVC 模式下的伪静态: 通过路由就可以搞定 首先说下路由规则,允许多个路由规则,会从上之下寻找匹配 伪静态: 如果只写一个路由 那么 所有页面都必须是 html 结尾. 如果再加一个路由 就都支持了 ...

  6. linux c ping 实现

    用c语言实现的linux中的ping命令 #include <stdio.h> #include <signal.h> #include <arpa/inet.h> ...

  7. Bash shell 简单的并行任务,并等待

    首先启动两个command line对于实验 第一 command line 依次输入: bash$ sleep 10001 & [1] 38272 bash$ job1=$! bash$ s ...

  8. HTML页面的动画的制作及性能

    原文:HTML页面的动画的制作及性能 WEB页面的动画的制作及性能 简介 目前WEB页面做动画的方式大的分两种1.JS间隔时间不断修改元素属性值,这也是CSS3出来前常用的做法,貌似也是唯一的做法.2 ...

  9. Android 4.4堆叠结构的变化

    我们知道,activity 在 AMS 的形式是 ActivityRecord,task 在 AMS 的形式TaskRecord,流程 AMS 该管理形式 ProcessRecord. 我们先看下 4 ...

  10. JavaScript的闭包特性

    闭包是一个比较抽象的概念,尤其是对js新手来说.在这里,我就我个人的理解j简单谈一下: 闭包:官方解释是一个拥有许多变量和绑定了这些变量的环境的表达式(通常是一个函数),因而这些变量也是该表达式的一部 ...