1 | <%@ CodePage=65001 Language="VBScript"%>
|
---|
2 | <% Option Explicit %>
|
---|
3 | <!--
|
---|
4 | * FCKeditor - The text editor for internet
|
---|
5 | * Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
---|
6 | *
|
---|
7 | * Licensed under the terms of the GNU Lesser General Public License:
|
---|
8 | * http://www.opensource.org/licenses/lgpl-license.php
|
---|
9 | *
|
---|
10 | * For further information visit:
|
---|
11 | * http://www.fckeditor.net/
|
---|
12 | *
|
---|
13 | * "Support Open Source software. What about a donation today?"
|
---|
14 | *
|
---|
15 | * File Name: sample03.asp
|
---|
16 | * Sample page.
|
---|
17 | *
|
---|
18 | * File Authors:
|
---|
19 | * Frederico Caldeira Knabben (fredck@fckeditor.net)
|
---|
20 | -->
|
---|
21 | <% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
---|
22 | <!-- #INCLUDE file="../../fckeditor.asp" -->
|
---|
23 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
24 | <html>
|
---|
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">
|
---|
31 |
|
---|
32 | function FCKeditor_OnComplete( editorInstance )
|
---|
33 | {
|
---|
34 | var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
---|
35 | oCombo.value = editorInstance.ToolbarSet.Name ;
|
---|
36 | oCombo.style.visibility = '' ;
|
---|
37 | }
|
---|
38 |
|
---|
39 | function ChangeToolbar( toolbarName )
|
---|
40 | {
|
---|
41 | window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
---|
42 | }
|
---|
43 |
|
---|
44 | </script>
|
---|
45 | </head>
|
---|
46 | <body>
|
---|
47 | <h1>FCKeditor - ASP - Sample 3</h1>
|
---|
48 | This sample shows how to change the editor toolbar.
|
---|
49 | <hr>
|
---|
50 | <table cellpadding="0" cellspacing="0" border="0">
|
---|
51 | <tr>
|
---|
52 | <td>
|
---|
53 | Select the toolbar to load:
|
---|
54 | </td>
|
---|
55 | <td>
|
---|
56 | <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
---|
57 | <option value="Default" selected>Default</option>
|
---|
58 | <option value="Basic">Basic</option>
|
---|
59 | </select>
|
---|
60 | </td>
|
---|
61 | </tr>
|
---|
62 | </table>
|
---|
63 | <br>
|
---|
64 | <form action="sampleposteddata.asp" method="post" target="_blank">
|
---|
65 | <%
|
---|
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 | Dim sBasePath
|
---|
70 | sBasePath = Request.ServerVariables("PATH_INFO")
|
---|
71 | sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
---|
72 |
|
---|
73 | Dim oFCKeditor
|
---|
74 | Set oFCKeditor = New FCKeditor
|
---|
75 | oFCKeditor.BasePath = sBasePath
|
---|
76 |
|
---|
77 | If Request.QueryString("Toolbar") <> "" Then
|
---|
78 | oFCKeditor.ToolbarSet = Server.HTMLEncode( Request.QueryString("Toolbar") )
|
---|
79 | End If
|
---|
80 |
|
---|
81 | oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
---|
82 | oFCKeditor.Create "FCKeditor1"
|
---|
83 | %>
|
---|
84 | <br>
|
---|
85 | <input type="submit" value="Submit">
|
---|
86 | </form>
|
---|
87 | </body>
|
---|
88 | </html> |
---|