php asp js 調用fckeditor編輯器的方法

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.