1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
2 | <!--
|
---|
3 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
---|
4 | * Copyright (C) 2003-2009 Frederico Caldeira Knabben
|
---|
5 | *
|
---|
6 | * == BEGIN LICENSE ==
|
---|
7 | *
|
---|
8 | * Licensed under the terms of any of the following licenses at your
|
---|
9 | * choice:
|
---|
10 | *
|
---|
11 | * - GNU General Public License Version 2 or later (the "GPL")
|
---|
12 | * http://www.gnu.org/licenses/gpl.html
|
---|
13 | *
|
---|
14 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
|
---|
15 | * http://www.gnu.org/licenses/lgpl.html
|
---|
16 | *
|
---|
17 | * - Mozilla Public License Version 1.1 or later (the "MPL")
|
---|
18 | * http://www.mozilla.org/MPL/MPL-1.1.html
|
---|
19 | *
|
---|
20 | * == END LICENSE ==
|
---|
21 | *
|
---|
22 | * Sample page.
|
---|
23 | -->
|
---|
24 | <html xmlns="http://www.w3.org/1999/xhtml">
|
---|
25 | <head>
|
---|
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()
|
---|
34 | {
|
---|
35 | var html = FCKeditorAPI.GetInstance( 'FCKeditor1' ).GetData() ;
|
---|
36 | var flash = document.getElementById( 'fckFlash' ) ;
|
---|
37 | flash.setData( html ) ;
|
---|
38 | }
|
---|
39 |
|
---|
40 | function init()
|
---|
41 | {
|
---|
42 | var so = new SWFObject("assets/sample16.swf", "fckFlash", "550", "400", "8", "#ffffff") ;
|
---|
43 | so.addParam("wmode", "transparent");
|
---|
44 | so.write("fckFlashContainer") ;
|
---|
45 | }
|
---|
46 | </script>
|
---|
47 | </head>
|
---|
48 | <body onload="init();">
|
---|
49 | <h1>
|
---|
50 | FCKeditor - JavaScript - Sample 16
|
---|
51 | </h1>
|
---|
52 | <div>
|
---|
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">
|
---|
55 | Flash</a>.
|
---|
56 | </div>
|
---|
57 | <hr />
|
---|
58 | <table width="100%" cellpadding="0" cellspacing="0">
|
---|
59 | <tr>
|
---|
60 | <td style="width: 100%">
|
---|
61 | <script type="text/javascript">
|
---|
62 | <!--
|
---|
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')) ;
|
---|
70 |
|
---|
71 | var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
---|
72 | oFCKeditor.BasePath = sBasePath ;
|
---|
73 |
|
---|
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>' ;
|
---|
81 | oFCKeditor.Create() ;
|
---|
82 | //-->
|
---|
83 | </script>
|
---|
84 | <input type="button" value="Send to Flash" onclick="sendToFlash();" />
|
---|
85 | </td>
|
---|
86 | <td valign="top" style="padding-left: 15px" id="fckFlashContainer">
|
---|
87 | </td>
|
---|
88 | </tr>
|
---|
89 | </table>
|
---|
90 | </body>
|
---|
91 | </html>
|
---|