php调用fckeditor编辑方法
<?
include("../editor/fckeditor.php");$ofckeditor = new fckeditor('fckeditor1') ;
$ofckeditor->basepath = '../editor/';
$ofckeditor->value = '';
$ofckeditor->width = '100%' ;
$ofckeditor->height = '360' ;
$ofckeditor->create() ;?>
fckeditor asp调用方法1
<!-- #include file="fckeditor/fckeditor.asp" -->
<form action="sampleposteddata.asp" method="post" target="_blank">
<%
dim ofckeditor
set ofckeditor = new fckeditor
ofckeditor.basepath = "/fckeditor/"
ofckeditor.toolbarset = "default"
ofckeditor.width = "100%"
ofckeditor.height = "400"
ofckeditor.value = "1234123123"
ofckeditor.create "content"
%>
js调用fck方法
fckeditor js调用方法1
<script src="fckeditor/fckeditor.js"></script>
<script type="text/网页特效">
var ofckeditor = new fckeditor( 'content' ) ;
ofckeditor.basepath = 'fckeditor/' ;
ofckeditor.toolbarset = 'basic' ;
ofckeditor.width = '100%' ;
ofckeditor.height = '400' ;
ofckeditor.value = '' ;
ofckeditor.create() ;
</script>
一些fck编辑器会常用字用到的
fckeditorapi是fckeditor加载后注册的一个全局对象,利用它我们就可以完成对编辑器的各种操作。
在当前页获得 fck 编辑器实例:
var editor = fckeditorapi.getinstance('instancename');
从 fck 编辑器的弹出窗口中获得 fck 编辑器实例:
var editor = window.parent.innerdialogloaded().fck;
从框架页面的子框架中获得其它子框架的 fck 编辑器实例:
var editor = window.framename.fckeditorapi.getinstance('instancename');
从页面弹出窗口中获得父窗口的 fck 编辑器实例:
var editor = opener.fckeditorapi.getinstance('instancename');
获得 fck 编辑器的内容:
oeditor.getxhtml(formatted); // formatted 为:true|false,表示是否按html格式取出
也可用:
oeditor.getxhtml();
设置 fck 编辑器的内容:
oeditor.sethtml("content", false); // 第二个参数为:true|false,是否以所见即所得方式设置其内容。此方法常用于"设置初始值"或"表单重置"哦作。
插入内容到 fck 编辑器:
oeditor.inserthtml("html"); // "html"为html文本
检查 fck 编辑器内容是否发生变化:
oeditor.isdirty();
fck推荐下载地址
http://down.111cn.net/webedit/2009/0429/fck-dedecms.html