[3019] | 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-2009, 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>Sample - CKEditor</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 id="headscript" 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 | <!-- This <fieldset> holds the HTML that you will usually find in your
|
---|
| 52 | pages. -->
|
---|
| 53 | <div style="float: left; margin-right: 20px">
|
---|
| 54 | When ENTER is pressed:<br/>
|
---|
| 55 | <select id="xEnter" onchange="changeEnter();">
|
---|
| 56 | <option selected="selected" value="1">Create new <P> (recommended)</option>
|
---|
| 57 | <option value="3">Create new <DIV></option>
|
---|
| 58 | <option value="2">Break the line with a <BR></option>
|
---|
| 59 | </select>
|
---|
| 60 | </div>
|
---|
| 61 | <div style="float: left">
|
---|
| 62 | When SHIFT + ENTER is pressed:<br/>
|
---|
| 63 | <select id="xShiftEnter" onchange="changeEnter();">
|
---|
| 64 | <option value="1">Create new <P></option>
|
---|
| 65 | <option value="3">Create new <DIV></option>
|
---|
| 66 | <option selected="selected" value="2">Break the line with a <BR> (recommended)</option>
|
---|
| 67 | </select>
|
---|
| 68 | </div>
|
---|
| 69 | <br style="clear: both"/>
|
---|
| 70 |
|
---|
| 71 | <form action="sample_posteddata.php" method="post">
|
---|
| 72 | <p>
|
---|
| 73 | <br/>
|
---|
| 74 | <textarea cols="80" id="editor1" name="editor1" rows="10">This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">CKEditor</a>.</textarea>
|
---|
| 75 | </p>
|
---|
| 76 | <p>
|
---|
| 77 | <input type="submit" value="Submit"/>
|
---|
| 78 | </p>
|
---|
| 79 | </form>
|
---|
| 80 | <div id="footer">
|
---|
| 81 | <hr/>
|
---|
| 82 | <p>
|
---|
| 83 | CKEditor - The text editor for Internet - <a href="http://ckeditor.com/" shape="rect">http://ckeditor.com</a>
|
---|
| 84 | </p>
|
---|
| 85 | <p id="copy">
|
---|
| 86 | Copyright © 2003-2009, <a href="http://cksource.com/" shape="rect">CKSource</a> - Frederico Knabben. All rights reserved.
|
---|
| 87 | </p>
|
---|
| 88 | </div>
|
---|
| 89 | </body>
|
---|
| 90 | </html>
|
---|