[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/libraries/ckeditor/_samples/ -> enterkey.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>ENTER Key Configuration - 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 src="sample.js" type="text/javascript"></script>
  12      <link href="sample.css" rel="stylesheet" type="text/css" />
  13      <script type="text/javascript">
  14      //<![CDATA[

  15  
  16  var editor;
  17  
  18  function changeEnter()
  19  {
  20      // If we already have an editor, let's destroy it first.

  21      if ( editor )
  22          editor.destroy( true );
  23  
  24      // Create the editor again, with the appropriate settings.

  25      editor = CKEDITOR.replace( 'editor1',
  26          {
  27              enterMode        : Number( document.getElementById( 'xEnter' ).value ),
  28              shiftEnterMode    : Number( document.getElementById( 'xShiftEnter' ).value )
  29          });
  30  }
  31  
  32  window.onload = changeEnter;
  33  
  34      //]]>

  35      </script>
  36  </head>
  37  <body>
  38      <h1>
  39          CKEditor Sample
  40      </h1>
  41      <!-- This <div> holds alert messages to be display in the sample page. -->
  42      <div id="alerts">
  43          <noscript>
  44              <p>
  45                  <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
  46                  support, like yours, you should still see the contents (HTML data) and you should
  47                  be able to edit it normally, without a rich editor interface.
  48              </p>
  49          </noscript>
  50      </div>
  51      <div style="float: left; margin-right: 20px">
  52          When ENTER is pressed:<br />
  53          <select id="xEnter" onchange="changeEnter();">
  54              <option selected="selected" value="1">Create new &lt;P&gt; (recommended)</option>
  55              <option value="3">Create new &lt;DIV&gt;</option>
  56              <option value="2">Break the line with a &lt;BR&gt;</option>
  57          </select>
  58      </div>
  59      <div style="float: left">
  60          When SHIFT + ENTER is pressed:<br />
  61          <select id="xShiftEnter" onchange="changeEnter();">
  62              <option value="1">Create new &lt;P&gt;</option>
  63              <option value="3">Create new &lt;DIV&gt;</option>
  64              <option selected="selected" value="2">Break the line with a &lt;BR&gt; (recommended)</option>
  65          </select>
  66      </div>
  67      <br style="clear: both" />
  68      <form action="sample_posteddata.php" method="post">
  69          <p>
  70              <br />
  71              <textarea cols="80" id="editor1" name="editor1" rows="10">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;.</textarea>
  72          </p>
  73          <p>
  74              <input type="submit" value="Submit" />
  75          </p>
  76      </form>
  77      <div id="footer">
  78          <hr />
  79          <p>
  80              CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
  81          </p>
  82          <p id="copy">
  83              Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
  84              Knabben. All rights reserved.
  85          </p>
  86      </div>
  87  </body>
  88  </html>


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