PHP ASP JS calls the FCKeditor editor method

Source: Internet
Author: User

PHP Invoke FCKeditor Editing method

?
Include (".. /editor/fckeditor.php ");

$ofckeditor = new FCKeditor (' Fckeditor1 ');
$ofckeditor->basepath = '.. /editor/';
$ofckeditor->value = ';
$ofckeditor->width = ' 100% ';
$ofckeditor->height = ' 360 ';
$ofckeditor->create ();

?>

FCKeditor asp Invoke Method 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 Call FCK method

FCKeditor js Call Method 1

<script src= "Fckeditor/fckeditor.js" ></script>
<script type= "text/web Effects" >
var ofckeditor = new FCKeditor (' content ');
Ofckeditor.basepath = ' fckeditor/';
Ofckeditor.toolbarset = ' basic ';
Ofckeditor.width = ' 100% ';
Ofckeditor.height = ' 400 ';
Ofckeditor.value = ';
Ofckeditor.create ();
</script>

Some FCK editors will use the

Fckeditorapi is a global object that is registered after FCKeditor is loaded, and we can use it to complete various operations on the editor.

Get FCK Editor Instance on current page:
var editor = fckeditorapi.getinstance (' instancename ');

Get the FCK editor instance from the pop-up window of the FCK editor:
var editor = window.parent.innerdialogloaded (). FCK;

To obtain a FCK editor instance of another child frame from a child frame of a frames page:
var editor = window.framename.fckeditorapi.getinstance (' instancename ');

To get the FCK editor instance of the parent window from the page pop-up window:
var editor = opener.fckeditorapi.getinstance (' instancename ');

Get the contents of the FCK Editor:
oeditor.getxhtml (formatted); Formatted as: True|false, indicating whether to remove in HTML format
Also available:
Oeditor.getxhtml ();

To set the contents of the FCK Editor:
oeditor.sethtml ("content", false); The second parameter is: True|false, whether the contents are set in WYSIWYG mode. This method is often used for "set initial value" or "form Reset" Oh.

To insert content into the FCK editor:
oeditor.inserthtml ("HTML"); "HTML" as HTML text

Check if the contents of the FCK editor have changed:
Oeditor.isdirty ();


FCK Recommended Download Address

Http://down.111cn.net/webedit/2009/0429/fck-dedecms.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.