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,是否以所見即所得 (WYSIWYG)方式設定其內容。此方法常用於"設定初始值"或"表單重設"哦作。
插入內容到 fck 編輯器:
oeditor.inserthtml("html"); // "html"為html文本
檢查 fck 編輯器內容是否發生變化:
oeditor.isdirty();
fck推薦下載地址
http://down.111cn.net/webedit/2009/0429/fck-dedecms.html