php asp js 调用fckeditor编辑器的方法

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

时间: 2024-12-24 11:34:44

php asp js 调用fckeditor编辑器的方法的相关文章

asp.net中调用fckeditor编辑器的方法与配置方法

一.集成方法     FCKeditor应用在ASP.NET上,需要两组文件,一组是FCKeditor本身,另一个是用于ASP.NET的FCKeditor控件(分为1.1和2.0两个版本,这里使用2.0版本).     1. 将FCKeditor加入到项目中     解压FCKeditor编辑器,得到文件夹fckeditor,复制此文件夹到Web应用的项目下(也可以是子孙目录下).     解压FCKeditor控件,在其子目录bin/Release/2.0下有一个程序集.在Web应用的项目中引

php在页面中调用fckeditor编辑器的方法

刚才在论坛上看到一个童鞋分享的方法,感觉不是很全面,现在分享下我的! 复制代码 代码如下: PHP页面: /* 编辑器 */ include_once "../include/fckeditor/fckeditor.php";//把编辑器引进来 $editor = new FCKeditor('content');//表单项的名称 $editor->BasePath = "/fckeditor/";//编辑器所在目录 $editor->ToolbarSe

php在页面中调用fckeditor编辑器的方法_php技巧

刚才在论坛上看到一个童鞋分享的方法,感觉不是很全面,现在分享下我的! 复制代码 代码如下: PHP页面: /* 编辑器 */ include_once "../include/fckeditor/fckeditor.php";//把编辑器引进来 $editor = new FCKeditor('content');//表单项的名称 $editor->BasePath = "/fckeditor/";//编辑器所在目录 $editor->ToolbarSe

php下安装配置fckeditor编辑器的方法

一.PHP调用fckeditor方法. 二.JS调用fckeditor方法. 复制代码 代码如下: <?php require_once(PATH_PRE."fckeditor.php"); // 包含fckeditor类, $oFCKeditor = new FCKeditor('content') ; //创建一个fckeditor对象,表单的名称为content $oFCKeditor->BasePath="../fckeditor/"; //编辑

php下安装配置fckeditor编辑器的方法_php技巧

一.PHP调用fckeditor方法. 二.JS调用fckeditor方法. 复制代码 代码如下: <?php require_once(PATH_PRE."fckeditor.php"); // 包含fckeditor类, $oFCKeditor = new FCKeditor('content') ; //创建一个fckeditor对象,表单的名称为content $oFCKeditor->BasePath="../fckeditor/"; //编辑

Asp.NET调用百度翻译的方法

 这篇文章主要介绍了Asp.NET调用百度翻译的方法,是针对百度接口开发的经典实用技巧,非常具有实用价值,需要的朋友可以参考下     本文实例讲述了Asp.NET调用百度翻译的方法.分享给大家供大家参考.具体分析如下: Asp.NET调用百度翻译,如下图所示: HTML代码如下:   代码如下: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="baidu.aspx.cs" I

Asp.NET调用百度翻译的方法_实用技巧

本文实例讲述了Asp.NET调用百度翻译的方法.分享给大家供大家参考.具体分析如下: Asp.NET调用百度翻译,如下图所示: HTML代码如下: 复制代码 代码如下: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="baidu.aspx.cs" Inherits="FanYi_baidu" %>  <!DOCTYPE html PUBLIC &

浅谈js控制li标签排序问题 js调用php函数的方法_javascript技巧

[Html代码] <span style="font-size:14px;"><ul class="list-group"> <? if ($categorys): ?> <? foreach ($categorys as $category):?> <li class="list-group-item" data-id="<? echo $category->id ?&

ThinkPHP中调用FCKeditor编辑器的代码

应用步骤: 1.下载FCKeditor2.x版本,将解压后的文件夹FCKeditor复制到ThinkPHP文件夹下的Vendor目录下,以便符合THinkPHP的第三方类库引入规则. 2.修改参数: 首先,用EditPlus等软件打开FCKeditor目录下的fckeditor_php5.php文件,找到第130行.出现内容如下:  代码如下 复制代码 public function __construct( $instanceName ) {$this->InstanceName = $ins