[ Index ] |
|
Code source de FCKeditor 2.4 |
1 <% 2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 3 * Copyright (C) 2003-2007 Frederico Caldeira Knabben 4 * 5 * == BEGIN LICENSE == 6 * 7 * Licensed under the terms of any of the following licenses at your 8 * choice: 9 * 10 * - GNU General Public License Version 2 or later (the "GPL") 11 * http://www.gnu.org/licenses/gpl.html 12 * 13 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 14 * http://www.gnu.org/licenses/lgpl.html 15 * 16 * - Mozilla Public License Version 1.1 or later (the "MPL") 17 * http://www.mozilla.org/MPL/MPL-1.1.html 18 * 19 * == END LICENSE == 20 * 21 * File Name: sample04.afp 22 * This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de) 23 * 24 * Version: 1.00 25 * Modified: 2006-11-13 26 * 27 * File Authors: Soenke Freitag (contact at www.afp-hosting.de) 28 * Frederico Caldeira Knabben (fredck@fckeditor.net) 29 30 %> 31 32 <html> 33 <head> 34 <title>FCKeditor - AFP Sample 4</title> 35 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 36 <meta name="robots" content="noindex, nofollow"> 37 <link href="../sample.css" rel="stylesheet" type="text/css" /> 38 39 <script type="text/javascript"> 40 function FCKeditor_OnComplete( editorInstance ) 41 { 42 var oCombo = document.getElementById( 'cmbSkins' ) ; 43 44 // Get the active skin. 45 var sSkin = editorInstance.Config['SkinPath'] ; 46 sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ; 47 48 oCombo.value = sSkin ; 49 oCombo.style.visibility = '' ; 50 } 51 52 function ChangeSkin( skinName ) 53 { 54 window.location.href = window.location.pathname + "?Skin=" + skinName ; 55 } 56 </script> 57 </head> 58 <body> 59 <h1>FCKeditor - AFP - Sample 4</h1> 60 This sample shows how to change the editor skin. 61 <hr> 62 <table cellpadding="0" cellspacing="0" border="0"> 63 <tr> 64 <td> 65 Select the skin to load: 66 </td> 67 <td> 68 <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden"> 69 <option value="default" selected>Default</option> 70 <option value="office2003">Office 2003</option> 71 <option value="silver">Silver</option> 72 </select> 73 </td> 74 </tr> 75 </table> 76 <br> 77 <form action="sampleposteddata.afp" method="post" target="_blank"> 78 <% 79 80 sBasePath="../../../fckeditor/" && <-- Change this to your local path 81 82 oFCKeditor = CREATEOBJECT("FCKeditor") 83 oFCKeditor.fckeditor("FCKeditor1") 84 85 lcSkin=request.querystring("Skin") && Request Parameter 86 lcSkin=oFCKeditor.StripAttacks(lcSkin) && Remove special escape characters 87 IF !EMPTY(lcSkin) 88 oFCKeditor.aconfig[1,1]="SkinPath" 89 oFCKeditor.aconfig[1,2]="/fckeditor/editor/skins/"+lcSkin+"/" && <-- Change this to your local path 90 ENDIF 91 92 lcText=[This is some <strong>sample text</strong>. You are using ] 93 lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.] 94 95 oFCKeditor.BasePath = sBasePath 96 oFCKeditor.cValue = lcText 97 98 ? oFCKeditor.Create() 99 100 %> 101 <br> 102 <input type="submit" value="Submit"> 103 </form> 104 </body> 105 </html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 15:28:05 2007 | par Balluche grâce à PHPXref 0.7 |