标签:ckeditor fckeditor ckeditor安装 ckeditor调用 ckeditor.js
安装<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
方式一:
通过JavaScript调用(我知道有3种方式)<textarea class="ckeditor"></textarea>2、创建一个textarea多行文本框,提供一个id或name,再通过CKEDITOR.replace()方法调用
<textarea id="editor1" name="editor1"></textarea> CKEDITOR.replace( ‘editor1‘, { toolbar : ‘Basic‘, uiColor : ‘#9AB8F3‘ });3、首先创建一个DIV层(填充textarea容器),然后调用CKEDITOR.appendTo()方法
<div id="editorSpace"></div> <script type="text/javascript"> CKEDITOR.appendTo("editorSpace"); </script>
方式二:
JSP中通过自定义标签调用(我知道有2种方式,反正大同小异)<%@ taglib prefix="ckeditor" uri="http://ckeditor.com" %>步骤三:添加一个textarea
<textarea cols="80" id="editor1" name="editor1" rows="10"></textarea>步骤四:通过replace标签,将普通textarea替代成CKEditor编辑器
<ckeditor:replace replace="editor1" basePath="/ckeditor/" />
2、
步骤一:导入jar包(ckeditor-java-core-3.5.3.jar,官网下载)<%@ taglib prefix="ckeditor" uri="http://ckeditor.com" %>步骤三:(无须添加textarea)
<ckeditor:editor editor="myEditor" basePath="/CKEditorSample/ckeditor/" value="Type here"></ckeditor:editor>属性介绍:
CKEditor学习笔记1(CKEditor安装、简单调用)
标签:ckeditor fckeditor ckeditor安装 ckeditor调用 ckeditor.js
原文地址:http://blog.csdn.net/com185272358/article/details/24812489