[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 | document.write( '<script type="text/javascript" src="../' +
|
---|
| 17 | 'lang/_languages.js"><\/script>' );
|
---|
| 18 |
|
---|
| 19 | //]]>
|
---|
| 20 | </script>
|
---|
| 21 | </head>
|
---|
| 22 | <body>
|
---|
| 23 | <h1>
|
---|
| 24 | CKEditor Sample
|
---|
| 25 | </h1>
|
---|
| 26 | <!-- This <div> holds alert messages to be display in the sample page. -->
|
---|
| 27 | <div id="alerts">
|
---|
| 28 | <noscript>
|
---|
| 29 | <p>
|
---|
| 30 | <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
|
---|
| 31 | support, like yours, you should still see the contents (HTML data) and you should
|
---|
| 32 | be able to edit it normally, without a rich editor interface.
|
---|
| 33 | </p>
|
---|
| 34 | </noscript>
|
---|
| 35 | </div>
|
---|
| 36 | <!-- This <fieldset> holds the HTML that you will usually find in your
|
---|
| 37 | pages. -->
|
---|
| 38 | <form action="sample_posteddata.php" method="post">
|
---|
| 39 | <p>
|
---|
| 40 | <label for="editor1">
|
---|
| 41 | Available languages (<span id="count">Â </span>
|
---|
| 42 | languages!):</label><br/>
|
---|
| 43 | <select disabled="disabled" id="languages" onchange="createEditor( this.value );">
|
---|
| 44 | <script type="text/javascript">
|
---|
| 45 | //<![CDATA[
|
---|
| 46 |
|
---|
| 47 | // Get the language list from the _languages.js file.
|
---|
| 48 | for ( var i = 0 ; i < window.CKEDITOR_LANGS.length ; i++ )
|
---|
| 49 | {
|
---|
| 50 | document.write(
|
---|
| 51 | '<option value="' + window.CKEDITOR_LANGS[i].code + '">' +
|
---|
| 52 | window.CKEDITOR_LANGS[i].name +
|
---|
| 53 | '</option>' );
|
---|
| 54 | }
|
---|
| 55 |
|
---|
| 56 | //]]>
|
---|
| 57 | </script>
|
---|
| 58 | </select>
|
---|
| 59 | <br/>
|
---|
| 60 | <span style="color: #888888">(You may see strange characters if your system doesn't
|
---|
| 61 | support the selected language)</span>
|
---|
| 62 | </p>
|
---|
| 63 | <p>
|
---|
| 64 | <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">CKEditor</a>.</p></textarea>
|
---|
| 65 | <script type="text/javascript">
|
---|
| 66 | //<![CDATA[
|
---|
| 67 |
|
---|
| 68 | // Set the number of languages.
|
---|
| 69 | document.getElementById( 'count' ).innerHTML = window.CKEDITOR_LANGS.length;
|
---|
| 70 |
|
---|
| 71 | var editor;
|
---|
| 72 |
|
---|
| 73 | function createEditor( languageCode )
|
---|
| 74 | {
|
---|
| 75 | if ( editor )
|
---|
| 76 | editor.destroy();
|
---|
| 77 |
|
---|
| 78 | // Replace the <textarea id="editor"> with an CKEditor
|
---|
| 79 | // instance, using default configurations.
|
---|
| 80 | editor = CKEDITOR.replace( 'editor1',
|
---|
| 81 | {
|
---|
| 82 | language : languageCode,
|
---|
| 83 |
|
---|
| 84 | on :
|
---|
| 85 | {
|
---|
| 86 | instanceReady : function()
|
---|
| 87 | {
|
---|
| 88 | // Wait for the editor to be ready to set
|
---|
| 89 | // the language combo.
|
---|
| 90 | var languages = document.getElementById( 'languages' );
|
---|
| 91 | languages.value = this.langCode;
|
---|
| 92 | languages.disabled = false;
|
---|
| 93 | }
|
---|
| 94 | }
|
---|
| 95 | } );
|
---|
| 96 | }
|
---|
| 97 |
|
---|
| 98 | // At page startup, load the default language:
|
---|
| 99 | createEditor( '' );
|
---|
| 100 |
|
---|
| 101 | //]]>
|
---|
| 102 | </script>
|
---|
| 103 | </p>
|
---|
| 104 | </form>
|
---|
| 105 | <div id="footer">
|
---|
| 106 | <hr/>
|
---|
| 107 | <p>
|
---|
| 108 | CKEditor - The text editor for Internet - <a href="http://ckeditor.com/" shape="rect">http://ckeditor.com</a>
|
---|
| 109 | </p>
|
---|
| 110 | <p id="copy">
|
---|
| 111 | Copyright © 2003-2009, <a href="http://cksource.com/" shape="rect">CKSource</a> - Frederico Knabben. All rights reserved.
|
---|
| 112 | </p>
|
---|
| 113 | </div>
|
---|
| 114 | </body>
|
---|
| 115 | </html>
|
---|