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-2009, 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>Sample - CKEditor</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 id="headscript" type="text/javascript">
\r
16 document.write( '<script type="text/javascript" src="../' +
\r
17 'lang/_languages.js"><\/script>' );
\r
26 <!-- This <div> holds alert messages to be display in the sample page. -->
\r
30 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
\r
31 support, like yours, you should still see the contents (HTML data) and you should
\r
32 be able to edit it normally, without a rich editor interface.
\r
36 <!-- This <fieldset> holds the HTML that you will usually find in your
\r
38 <form action="sample_posteddata.php" method="post">
\r
40 <label for="editor1">
\r
41 Available languages (<span id="count"> </span>
\r
42 languages!):</label><br/>
\r
43 <select disabled="disabled" id="languages" onchange="createEditor( this.value );">
\r
44 <script type="text/javascript">
\r
47 // Get the language list from the _languages.js file.
\r
48 for ( var i = 0 ; i < window.CKEDITOR_LANGS.length ; i++ )
\r
51 '<option value="' + window.CKEDITOR_LANGS[i].code + '">' +
\r
52 window.CKEDITOR_LANGS[i].name +
\r
60 <span style="color: #888888">(You may see strange characters if your system doesn't
\r
61 support the selected language)</span>
\r
64 <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
\r
65 <script type="text/javascript">
\r
68 // Set the number of languages.
\r
69 document.getElementById( 'count' ).innerHTML = window.CKEDITOR_LANGS.length;
\r
73 function createEditor( languageCode )
\r
78 // Replace the <textarea id="editor"> with an CKEditor
\r
79 // instance, using default configurations.
\r
80 editor = CKEDITOR.replace( 'editor1',
\r
82 language : languageCode,
\r
86 instanceReady : function()
\r
88 // Wait for the editor to be ready to set
\r
89 // the language combo.
\r
90 var languages = document.getElementById( 'languages' );
\r
91 languages.value = this.langCode;
\r
92 languages.disabled = false;
\r
98 // At page startup, load the default language:
\r
108 CKEditor - The text editor for Internet - <a href="http://ckeditor.com/" shape="rect">http://ckeditor.com</a>
\r
111 Copyright © 2003-2009, <a href="http://cksource.com/" shape="rect">CKSource</a> - Frederico Knabben. All rights reserved.
\r