[ Index ]
 

Code source de FCKeditor 2.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/_samples/cfm/ -> sample02_mx.cfm (source)

   1  <cfsetting enablecfoutputonly="true">
   2  <!---
   3   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
   4   * Copyright (C) 2003-2007 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   * File Name: sample02_mx.cfm
  23   *     Sample page for ColdFusion MX.
  24   * 
  25   * File Authors:
  26   *         Hendrik Kramer (hk@lwd.de)
  27   *         Wim Lemmens (didgiman@gmail.com)
  28  --->
  29  
  30  <!--- ::
  31        * You must set the url path to the base directory for your media files (images, flash, files)
  32        * The best position for this variable is in your Application.cfm file
  33        * 
  34        * Possible variable scopes are:
  35        * <cfset APPLICATION.userFilesPath = "/userfiles/">
  36        * OR:
  37        * <cfset SERVER.userFilesPath = "/userfiles/">
  38        * OR:
  39        * <cfset request.FCKeditor.userFilesPath = "/userfiles/">
  40        * OR:
  41        * <cfset application.FCKeditor.userFilesPath = "/userfiles/">
  42        * OR:
  43        * <cfset server.FCKeditor.userFilesPath = "/userfiles/">
  44        *
  45        * Note #1: Do _not_ set the physical directory on your server, only a path relative to your current webroot
  46        * Note #2: Directories will be automatically created
  47        :: --->
  48  
  49  <cfoutput>
  50  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  51  <html>
  52  <head>
  53      <title>FCKeditor - Sample</title>
  54      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  55      <meta name="robots" content="noindex, nofollow">
  56      <link href="../sample.css" rel="stylesheet" type="text/css" />
  57  </head>
  58  <body>
  59  <h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1>
  60  
  61  This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Component.
  62  <hr>
  63  
  64  <form method="POST" action="#cgi.script_name#">
  65  </cfoutput>
  66  
  67  <cfif listFirst( server.coldFusion.productVersion ) LT 6>
  68      <cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput>
  69      <cfabort>
  70  </cfif>
  71  
  72  <cfscript>
  73      // Calculate basepath for FCKeditor. It's in the folder right above _samples
  74      basePath = Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1);
  75  
  76      fckEditor = createObject("component", "#basePath#fckeditor");
  77      fckEditor.instanceName    = "myEditor";
  78      fckEditor.value            = 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.';
  79      fckEditor.basePath        = basePath;
  80      fckEditor.width            = "100%";
  81      fckEditor.height        = 300;
  82      fckEditor.create(); // create the editor.
  83  </cfscript>
  84  
  85  <cfoutput>
  86  <br />
  87  <input type="submit" value="Submit">
  88  <hr />
  89  </cfoutput>
  90  
  91  <cfdump 
  92      var="#FORM#" 
  93      label="Dump of FORM Variables"
  94  >
  95  
  96  <cfoutput></form></body></html></cfoutput>
  97  
  98  <cfsetting enablecfoutputonly="false">


Généré le : Sun Feb 25 15:28:05 2007 par Balluche grâce à PHPXref 0.7