/EQT_V2/EQT/EQTWebApp/fckeditor/_samples/cfm/sample01_mx.cfm

http://sgsoft-las.googlecode.com/ · ColdFusion · 67 lines · 40 code · 5 blank · 22 comment · 1 complexity · cbe8fdff588d085b579c3602795ebca5 MD5 · raw file

  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 MX 6.0 and above.
  23. --->
  24. <cfoutput>
  25. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 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. </head>
  33. <body>
  34. <h1>FCKeditor - ColdFusion Component (CFC) - Sample 1</h1>
  35. This sample displays a normal HTML form with a FCKeditor with full features enabled.
  36. <hr>
  37. <form method="POST" action="sampleposteddata.cfm">
  38. </cfoutput>
  39. <cfif listFirst( server.coldFusion.productVersion ) LT 6>
  40. <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>
  41. <cfabort>
  42. </cfif>
  43. <cfscript>
  44. // Calculate basepath for FCKeditor. It's in the folder right above _samples
  45. basePath = Left( cgi.script_name, FindNoCase( '_samples', cgi.script_name ) - 1 ) ;
  46. fckEditor = createObject( "component", "#basePath#fckeditor" ) ;
  47. fckEditor.instanceName = "myEditor" ;
  48. fckEditor.value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;
  49. fckEditor.basePath = basePath ;
  50. fckEditor.Create() ; // create the editor.
  51. </cfscript>
  52. <cfoutput>
  53. <br />
  54. <input type="submit" value="Submit">
  55. <hr />
  56. </form>
  57. </body>
  58. </html>
  59. </cfoutput>
  60. <cfsetting enablecfoutputonly="false">