[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/libraries/ckeditor/_samples/ -> ui_languages.html (source)

   1  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   2  <!--
   3  Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
   4  For licensing, see LICENSE.html or http://ckeditor.com/license
   5  -->
   6  <html xmlns="http://www.w3.org/1999/xhtml">
   7  <head>
   8      <title>User Interface Globalization - CKEditor Sample</title>
   9      <meta content="text/html; charset=utf-8" http-equiv="content-type" />
  10      <script type="text/javascript" src="../ckeditor.js"></script>
  11      <script type="text/javascript" src="../lang/_languages.js"></script>
  12      <script src="sample.js" type="text/javascript"></script>
  13      <link href="sample.css" rel="stylesheet" type="text/css" />
  14  </head>
  15  <body>
  16      <h1>
  17          CKEditor Sample
  18      </h1>
  19      <!-- This <div> holds alert messages to be display in the sample page. -->
  20      <div id="alerts">
  21          <noscript>
  22              <p>
  23                  <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
  24                  support, like yours, you should still see the contents (HTML data) and you should
  25                  be able to edit it normally, without a rich editor interface.
  26              </p>
  27          </noscript>
  28      </div>
  29      <form action="sample_posteddata.php" method="post">
  30          <p>
  31              Available languages (<span id="count"> </span> languages!):<br />
  32              <script type="text/javascript">
  33              //<![CDATA[

  34                  document.write( '<select disabled="disabled" id="languages" onchange="createEditor( this.value );">' );
  35                  // Get the language list from the _languages.js file.

  36                  for ( var i = 0 ; i < window.CKEDITOR_LANGS.length ; i++ )
  37                  {
  38                      document.write(
  39                          '<option value="' + window.CKEDITOR_LANGS[i].code + '">' +
  40                              window.CKEDITOR_LANGS[i].name +
  41                          '</option>' );
  42                  }
  43                  document.write( '</select>' );
  44              //]]>

  45              </script>
  46              <br />
  47              <span style="color: #888888">(You may see strange characters if your system doesn't
  48                  support the selected language)</span>
  49          </p>
  50          <p>
  51              <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
  52              <script type="text/javascript">
  53              //<![CDATA[

  54  
  55                  // Set the number of languages.

  56                  document.getElementById( 'count' ).innerHTML = window.CKEDITOR_LANGS.length;
  57  
  58                  var editor;
  59  
  60  				function createEditor( languageCode )
  61                  {
  62                      if ( editor )
  63                          editor.destroy();
  64  
  65                      // Replace the <textarea id="editor"> with an CKEditor

  66                      // instance, using default configurations.

  67                      editor = CKEDITOR.replace( 'editor1',
  68                          {
  69                              language : languageCode,
  70  
  71                              on :
  72                              {
  73                                  instanceReady : function()
  74                                  {
  75                                      // Wait for the editor to be ready to set

  76                                      // the language combo.

  77                                      var languages = document.getElementById( 'languages' );
  78                                      languages.value = this.langCode;
  79                                      languages.disabled = false;
  80                                  }
  81                              }
  82                          } );
  83                  }
  84  
  85                  // At page startup, load the default language:

  86                  createEditor( '' );
  87  
  88              //]]>

  89              </script>
  90          </p>
  91      </form>
  92      <div id="footer">
  93          <hr />
  94          <p>
  95              CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
  96          </p>
  97          <p id="copy">
  98              Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
  99              Knabben. All rights reserved.
 100          </p>
 101      </div>
 102  </body>
 103  </html>


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7