[ Index ]
 

Code source de FCKeditor 2.4

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

title

Body

[fermer]

/_samples/afp/ -> sample03.afp (source)

   1  <% 
   2   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
   3   * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   4   * 
   5   * == BEGIN LICENSE ==
   6   * 
   7   * Licensed under the terms of any of the following licenses at your
   8   * choice:
   9   * 
  10   *  - GNU General Public License Version 2 or later (the "GPL")
  11   *    http://www.gnu.org/licenses/gpl.html
  12   * 
  13   *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  14   *    http://www.gnu.org/licenses/lgpl.html
  15   * 
  16   *  - Mozilla Public License Version 1.1 or later (the "MPL")
  17   *    http://www.mozilla.org/MPL/MPL-1.1.html
  18   * 
  19   * == END LICENSE ==
  20   * 
  21   * File Name: sample03.afp
  22   *     This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
  23   * 
  24   * Version:  1.00 
  25   * Modified: 2006-11-13
  26   * 
  27   * File Authors: Soenke Freitag (contact at www.afp-hosting.de)
  28   *                  Frederico Caldeira Knabben (fredck@fckeditor.net)
  29  
  30  %>
  31  
  32  <html>
  33      <head>
  34          <title>FCKeditor - AFP Sample 3</title>
  35          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  36          <meta name="robots" content="noindex, nofollow">
  37          <link href="../sample.css" rel="stylesheet" type="text/css" />
  38  
  39          <script type="text/javascript">
  40  			function FCKeditor_OnComplete( editorInstance )
  41              {
  42                  var oCombo = document.getElementById( 'cmbToolbars' ) ;
  43                  oCombo.value = editorInstance.ToolbarSet.Name ;
  44                  oCombo.style.visibility = '' ;
  45              }
  46              
  47  			function ChangeToolbar( toolbarName )
  48              {
  49                  window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
  50              }
  51          </script>
  52          </head>
  53      <body>
  54          <h1>FCKeditor - AFP - Sample 3</h1>
  55          This sample shows how to change the editor toolbar.
  56          <hr>
  57          <table cellpadding="0" cellspacing="0" border="0">
  58              <tr>
  59                  <td>
  60                      Select the toolbar to load:&nbsp;
  61                  </td>
  62                  <td>
  63                      <select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
  64                          <option value="Default" selected>Default</option>
  65                          <option value="Basic">Basic</option>
  66                      </select>
  67                  </td>
  68              </tr>
  69          </table>
  70          <br>
  71          <form action="sampleposteddata.afp" method="post" target="_blank">
  72  <%
  73  
  74              sBasePath="../../../fckeditor/"                        && Change this to your local path
  75      
  76              oFCKeditor = CREATEOBJECT("FCKeditor")
  77              oFCKeditor.fckeditor("FCKeditor1")
  78  
  79              lcToolbar=request.querystring("Toolbar")            && Request Parameter
  80              lcToolbar=oFCKeditor.StripAttacks(lcToolbar)        && Remove special escape characters
  81              IF !EMPTY(lcToolbar)    
  82                  oFCKeditor.ToolbarSet=lcToolbar
  83              ENDIF
  84  
  85              lcText=[This is some <strong>sample text</strong>. You are using ]
  86              lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
  87  
  88              oFCKeditor.BasePath    = sBasePath 
  89              oFCKeditor.cValue    = lcText
  90              
  91              ? oFCKeditor.Create() 
  92   
  93  %>
  94              <br>
  95              <input type="submit" value="Submit">
  96          </form>
  97      </body>
  98  </html>


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