1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
24
<html xmlns="http://www.w3.org/1999/xhtml">
26
<title>FCKeditor - Sample</title>
27
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
28
<meta name="robots" content="noindex, nofollow" />
29
<link href="../sample.css" rel="stylesheet" type="text/css" />
30
<script type="text/javascript" src="../../fckeditor.js"></script>
31
<script type="text/javascript" src="assets/swfobject.js"></script>
32
<script type="text/javascript">
33
function sendToFlash()
35
var html = FCKeditorAPI.GetInstance( 'FCKeditor1' ).GetData() ;
36
var flash = document.getElementById( 'fckFlash' ) ;
37
flash.setData( html ) ;
42
var so = new SWFObject("assets/sample16.swf", "fckFlash", "550", "400", "8", "#ffffff") ;
43
so.addParam("wmode", "transparent");
44
so.write("fckFlashContainer") ;
48
<body onload="init();">
50
FCKeditor - JavaScript - Sample 16
53
This sample shows FCKeditor configured to produce HTML code that can be used with
54
<a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14808#TextArea_Component">
58
<table width="100%" cellpadding="0" cellspacing="0">
60
<td style="width: 100%">
61
<script type="text/javascript">
63
if ( document.location.protocol == 'file:' )
64
alert( 'Warning: This samples does not work when loaded from local filesystem due to security restrictions implemented in Flash.'
65
+ '\n\nPlease load the sample from a web server instead.') ;
66
// Automatically calculates the editor base path based on the _samples directory.
67
// This is usefull only for these samples. A real application should use something like this:
68
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
69
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;
71
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
72
oFCKeditor.BasePath = sBasePath ;
74
// Instruct the editor to load our configurations from a custom file, leaving the
75
// original configuration file untouched.
76
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/assets/sample16.config.js' ;
77
oFCKeditor.Height = 400 ;
78
oFCKeditor.Width = '100%' ;
79
oFCKeditor.ToolbarSet = 'Flash' ;
80
oFCKeditor.Value = '<p>This is some <b>sample text<\/b>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
84
<input type="button" value="Send to Flash" onclick="sendToFlash();" />
86
<td valign="top" style="padding-left: 15px" id="fckFlashContainer">