[ Index ] |
|
Code source de FCKeditor 2.4 |
1 <%@ CodePage=65001 Language="VBScript"%> 2 <% Option Explicit %> 3 <!-- 4 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 5 * Copyright (C) 2003-2007 Frederico Caldeira Knabben 6 * 7 * == BEGIN LICENSE == 8 * 9 * Licensed under the terms of any of the following licenses at your 10 * choice: 11 * 12 * - GNU General Public License Version 2 or later (the "GPL") 13 * http://www.gnu.org/licenses/gpl.html 14 * 15 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") 16 * http://www.gnu.org/licenses/lgpl.html 17 * 18 * - Mozilla Public License Version 1.1 or later (the "MPL") 19 * http://www.mozilla.org/MPL/MPL-1.1.html 20 * 21 * == END LICENSE == 22 * 23 * File Name: sample03.asp 24 * Sample page. 25 * 26 * File Authors: 27 * Frederico Caldeira Knabben (www.fckeditor.net) 28 --> 29 <% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %> 30 <!-- #INCLUDE file="../../fckeditor.asp" --> 31 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 32 <html> 33 <head> 34 <title>FCKeditor - Sample</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 <script type="text/javascript"> 39 40 function FCKeditor_OnComplete( editorInstance ) 41 { 42 var oCombo = document.getElementById( 'cmbToolbars' ) ; 43 oCombo.value = editorInstance.ToolbarSet.Name ; 44 oCombo.style.visibility = '' ; 45 } 46 47 function ChangeToolbar( toolbarName ) 48 { 49 window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ; 50 } 51 52 </script> 53 </head> 54 <body> 55 <h1>FCKeditor - ASP - Sample 3</h1> 56 This sample shows how to change the editor toolbar. 57 <hr> 58 <table cellpadding="0" cellspacing="0" border="0"> 59 <tr> 60 <td> 61 Select the toolbar to load: 62 </td> 63 <td> 64 <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden"> 65 <option value="Default" selected>Default</option> 66 <option value="Basic">Basic</option> 67 </select> 68 </td> 69 </tr> 70 </table> 71 <br> 72 <form action="sampleposteddata.asp" method="post" target="_blank"> 73 <% 74 ' Automatically calculates the editor base path based on the _samples directory. 75 ' This is usefull only for these samples. A real application should use something like this: 76 ' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. 77 Dim sBasePath 78 sBasePath = Request.ServerVariables("PATH_INFO") 79 sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) ) 80 81 Dim oFCKeditor 82 Set oFCKeditor = New FCKeditor 83 oFCKeditor.BasePath = sBasePath 84 85 If Request.QueryString("Toolbar") <> "" Then 86 oFCKeditor.ToolbarSet = Server.HTMLEncode( Request.QueryString("Toolbar") ) 87 End If 88 89 oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>." 90 oFCKeditor.Create "FCKeditor1" 91 %> 92 <br> 93 <input type="submit" value="Submit"> 94 </form> 95 </body> 96 </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 |