source: companies/celepar/news_admin/templates/celepar/fckeditor/to_delete/_samples/asp/sample04.asp @ 763

Revision 763, 2.9 KB checked in by niltonneto, 15 years ago (diff)

Importação inicial do Expresso da Celepar

Line 
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: sample04.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
32function FCKeditor_OnComplete( editorInstance )
33{
34        var oCombo = document.getElementById( 'cmbSkins' ) ;
35       
36        // Get the active skin.
37        var sSkin = editorInstance.Config['SkinPath'] ;
38        sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
39       
40        oCombo.value = sSkin ;
41        oCombo.style.visibility = '' ;
42}
43
44function ChangeSkin( skinName )
45{
46        window.location.href = window.location.pathname + "?Skin=" + skinName ;
47}
48
49                </script>
50        </head>
51        <body>
52                <h1>FCKeditor - ASP - Sample 4</h1>
53                This sample shows how to change the editor skin.
54                <hr>
55                <table cellpadding="0" cellspacing="0" border="0">
56                        <tr>
57                                <td>
58                                        Select the skin to load:&nbsp;
59                                </td>
60                                <td>
61                                        <select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
62                                                <option value="default" selected>Default</option>
63                                                <option value="office2003">Office 2003</option>
64                                                <option value="silver">Silver</option>
65                                        </select>
66                                </td>
67                        </tr>
68                </table>
69                <br>
70                <form action="sampleposteddata.asp" method="post" target="_blank">
71<%
72' Automatically calculates the editor base path based on the _samples directory.
73' This is usefull only for these samples. A real application should use something like this:
74' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
75Dim sBasePath
76sBasePath = Request.ServerVariables("PATH_INFO")
77sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
78
79Dim oFCKeditor
80Set oFCKeditor = New FCKeditor
81oFCKeditor.BasePath = sBasePath
82
83If Request.QueryString("Skin") <> "" Then
84        oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Server.HTMLEncode( Request.QueryString("Skin") ) + "/"
85End If
86
87oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
88oFCKeditor.Create "FCKeditor1"
89%>
90                        <br>
91                        <input type="submit" value="Submit">
92                </form>
93        </body>
94</html>
Note: See TracBrowser for help on using the repository browser.