[ Index ]
 

Code source de FCKeditor 2.4

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

title

Body

[fermer]

/_samples/lasso/ -> sample02.lasso (source)

   1  [//lasso
   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.lasso
  23   *     Sample page.
  24   * 
  25   * File Authors:
  26   *         Jason Huck (jason.huck@corefive.com)
  27   */
  28  ]
  29  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  30  <html>
  31      <head>
  32          <title>FCKeditor - Sample</title>
  33          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  34          <meta name="robots" content="noindex, nofollow">
  35          <link href="../sample.css" rel="stylesheet" type="text/css" />
  36          <script type="text/javascript">
  37          <!--
  38  function FCKeditor_OnComplete( editorInstance )
  39  {
  40      var oCombo = document.getElementById( 'cmbLanguages' ) ;
  41      for ( code in editorInstance.Language.AvailableLanguages )
  42      {
  43          AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
  44      }
  45      oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
  46  }    
  47  
  48  function AddComboOption(combo, optionText, optionValue)
  49  {
  50      var oOption = document.createElement("OPTION") ;
  51  
  52      combo.options.add(oOption) ;
  53  
  54      oOption.innerHTML = optionText ;
  55      oOption.value     = optionValue ;
  56      
  57      return oOption ;
  58  }
  59  
  60  function ChangeLanguage( languageCode )
  61  {
  62      window.location.href = window.location.pathname + "?Lang=" + languageCode ;
  63  }
  64          //-->
  65          </script>
  66      </head>
  67      <body>
  68          <h1>FCKeditor - Lasso - Sample 2</h1>
  69          This sample shows the editor in all its available languages.
  70          <hr>
  71          <table cellpadding="0" cellspacing="0" border="0">
  72              <tr>
  73                  <td>
  74                      Select a language:&nbsp;
  75                  </td>
  76                  <td>
  77                      <select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
  78                      </select>
  79                  </td>
  80              </tr>
  81          </table>
  82          <br>
  83          <form action="sampleposteddata.lasso" method="post" target="_blank">
  84  [//lasso
  85      include ('../../fckeditor.lasso');
  86      var('basepath') = response_filepath->split('_samples')->get(1);
  87  
  88      if(action_param('Lang'));
  89          var('config') = array(
  90              'AutoDetectLanguage' = 'false',
  91              'DefaultLanguage' = action_param('Lang')
  92          );
  93      else;
  94          var('config') = array(
  95              'AutoDetectLanguage' = 'true',
  96              'DefaultLanguage' = 'en'
  97          );
  98      /if;
  99  
 100      var('myeditor') = fck_editor(
 101          -instancename='FCKeditor1',
 102          -basepath=$basepath,
 103          -config=$config,
 104          -initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
 105      );
 106      
 107      $myeditor->create;
 108  ]
 109              <br>
 110              <input type="submit" value="Submit">
 111          </form>
 112      </body>
 113  </html>


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