1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
\r
3 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
\r
4 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
6 <html xmlns="http://www.w3.org/1999/xhtml">
\r
8 <title>ENTER Key Configuration - CKEditor Sample</title>
\r
9 <meta content="text/html; charset=utf-8" http-equiv="content-type" />
\r
10 <script type="text/javascript" src="../ckeditor.js"></script>
\r
11 <script src="sample.js" type="text/javascript"></script>
\r
12 <link href="sample.css" rel="stylesheet" type="text/css" />
\r
13 <script type="text/javascript">
\r
18 function changeEnter()
\r
20 // If we already have an editor, let's destroy it first.
\r
22 editor.destroy( true );
\r
24 // Create the editor again, with the appropriate settings.
\r
25 editor = CKEDITOR.replace( 'editor1',
\r
27 enterMode : Number( document.getElementById( 'xEnter' ).value ),
\r
28 shiftEnterMode : Number( document.getElementById( 'xShiftEnter' ).value )
\r
32 window.onload = changeEnter;
\r
41 <!-- This <div> holds alert messages to be display in the sample page. -->
\r
45 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
\r
46 support, like yours, you should still see the contents (HTML data) and you should
\r
47 be able to edit it normally, without a rich editor interface.
\r
51 <div style="float: left; margin-right: 20px">
\r
52 When ENTER is pressed:<br />
\r
53 <select id="xEnter" onchange="changeEnter();">
\r
54 <option selected="selected" value="1">Create new <P> (recommended)</option>
\r
55 <option value="3">Create new <DIV></option>
\r
56 <option value="2">Break the line with a <BR></option>
\r
59 <div style="float: left">
\r
60 When SHIFT + ENTER is pressed:<br />
\r
61 <select id="xShiftEnter" onchange="changeEnter();">
\r
62 <option value="1">Create new <P></option>
\r
63 <option value="3">Create new <DIV></option>
\r
64 <option selected="selected" value="2">Break the line with a <BR> (recommended)</option>
\r
67 <br style="clear: both" />
\r
68 <form action="sample_posteddata.php" method="post">
\r
71 <textarea cols="80" id="editor1" name="editor1" rows="10">This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</textarea>
\r
74 <input type="submit" value="Submit" />
\r
80 CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
\r
83 Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
\r
84 Knabben. All rights reserved.
\r