您的位置:首页 > 编程语言 > Java开发

FCK整合java以及js调用

2011-08-02 14:42 232 查看
<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="com.ckeditor.ConfigurationHelper"%>

<%@page import="com.ckeditor.CKEditorConfig"%>

<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>

<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>

<%@page import="java.util.*" %>

<html>

<script type="text/javascript">

function clickHandle(){

CKEDITOR.instances.editor1.setData("上的方式的方式地方");

alert("sssssss:"+CKEDITOR.instances.editor1.getData());

}

</script>

<body>

<%

Map<String, String> attr = new HashMap<String, String>();

attr.put("rows", "4");

attr.put("cols", "3");

CKEditorConfig settings = new CKEditorConfig();

settings.addConfigValue("width","700");

settings.addConfigValue("toolbar","[[ 'Source', '-', 'Bold', 'Italic' ]]");

%>

<p>

<label for="editor1">Editor 1:</label>

<!-- <textarea cols="80" id="editor1" name="editor1" rows="10"></textarea> -->

</p>

<%-- <ckeditor:replace replace="editor1" basePath="ckeditor/" /> --%>

<p>

<ckeditor:editor textareaAttributes="<%=attr %>" basePath="ckeditor/" editor="editor1" value="输入"

events="<%= ConfigurationHelper.createEventHandlers() %>" >

</ckeditor:editor>

</p>

<button onclick="clickHandle()">click</button>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: