[1575] | 1 | <cfsetting enablecfoutputonly="true">
|
---|
| 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 for ColdFusion.
|
---|
| 23 | --->
|
---|
| 24 | <cfoutput>
|
---|
| 25 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 26 | <html>
|
---|
| 27 | <head>
|
---|
| 28 | <title>FCKeditor - Sample</title>
|
---|
| 29 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
---|
| 30 | <meta name="robots" content="noindex, nofollow">
|
---|
| 31 | <link href="../sample.css" rel="stylesheet" type="text/css" />
|
---|
| 32 | <script type="text/javascript">
|
---|
| 33 |
|
---|
| 34 | function FCKeditor_OnComplete( editorInstance )
|
---|
| 35 | {
|
---|
| 36 | var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
---|
| 37 | oCombo.value = editorInstance.ToolbarSet.Name ;
|
---|
| 38 | oCombo.style.visibility = '' ;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | function ChangeToolbar( toolbarName )
|
---|
| 42 | {
|
---|
| 43 | window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | </script>
|
---|
| 47 | </head>
|
---|
| 48 | <body>
|
---|
| 49 | <h1>FCKeditor - ColdFusion - Sample 3</h1>
|
---|
| 50 | This sample shows how to change the editor toolbar.
|
---|
| 51 | <hr>
|
---|
| 52 | <table cellpadding="0" cellspacing="0" border="0">
|
---|
| 53 | <tr>
|
---|
| 54 | <td>
|
---|
| 55 | Select the toolbar to load:
|
---|
| 56 | </td>
|
---|
| 57 | <td>
|
---|
| 58 | <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
---|
| 59 | <option value="Default" selected>Default</option>
|
---|
| 60 | <option value="Basic">Basic</option>
|
---|
| 61 | </select>
|
---|
| 62 | </td>
|
---|
| 63 | </tr>
|
---|
| 64 | </table>
|
---|
| 65 | <br>
|
---|
| 66 | <form action="sampleposteddata.cfm" method="post" target="_blank">
|
---|
| 67 | </cfoutput>
|
---|
| 68 |
|
---|
| 69 | <cfif isDefined( "URL.Toolbar" )>
|
---|
| 70 | <cfset toolbarSet = REReplaceNoCase( URL.Toolbar, "[^a-z]", "", "all" )>
|
---|
| 71 | <cfelse>
|
---|
| 72 | <cfset toolbarSet = "Default">
|
---|
| 73 | </cfif>
|
---|
| 74 |
|
---|
| 75 | <!--- Calculate basepath for FCKeditor. It's in the folder right above _samples --->
|
---|
| 76 | <cfset basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 )>
|
---|
| 77 |
|
---|
| 78 | <cfmodule
|
---|
| 79 | template="../../fckeditor.cfm"
|
---|
| 80 | basePath="#basePath#"
|
---|
| 81 | instanceName="myEditor"
|
---|
| 82 | value='<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>'
|
---|
| 83 | width="100%"
|
---|
| 84 | height="200"
|
---|
| 85 | toolbarSet="#toolbarSet#"
|
---|
| 86 | >
|
---|
| 87 |
|
---|
| 88 | <cfoutput>
|
---|
| 89 | <br>
|
---|
| 90 | <input type="submit" value="Submit">
|
---|
| 91 | </form>
|
---|
| 92 | </body>
|
---|
| 93 | </html>
|
---|
| 94 | </cfoutput>
|
---|
| 95 | <cfsetting enablecfoutputonly="false">
|
---|