Migration du code gestionnaire d'événement double-clic pour l'insertion d'un lien.
[ckeditor.git] / skins / ckeditor / _samples / stylesheetparser.html
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-2011, 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>Using Stylesheet Parser Plugin &mdash; 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 </head>
14 <body>
15 <h1 class="samples">
16 CKEditor Sample &mdash; Using the Stylesheet Parser Plugin
17 </h1>
18 <div class="description">
19 <p>
20 This sample shows how to configure CKEditor instances to use the
21 <strong>Stylesheet Parser</strong> (<code>stylesheetparser</code>) plugin that fills
22 the <strong>Styles</strong> drop-down list based on the CSS rules available in the document stylesheet.
23 </p>
24 <p>
25 To add a CKEditor instance using the <code>stylesheetparser</code> plugin, insert
26 the following JavaScript call into your code:
27 </p>
28 <pre class="samples">CKEDITOR.replace( '<em>textarea_id</em>',
29 {
30 <strong>extraPlugins : 'stylesheetparser'</strong>
31 });</pre>
32 <p>
33 Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
34 the <code>&lt;textarea&gt;</code> element to be replaced with CKEditor.
35 </p>
36 </div>
37
38 <!-- This <div> holds alert messages to be display in the sample page. -->
39 <div id="alerts">
40 <noscript>
41 <p>
42 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
43 support, like yours, you should still see the contents (HTML data) and you should
44 be able to edit it normally, without a rich editor interface.
45 </p>
46 </noscript>
47 </div>
48 <form action="sample_posteddata.php" method="post">
49 <p>
50 <label for="editor1">
51 CKEditor using the <code>stylesheetparser</code> plugin with its default configuration:</label>
52 <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;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;.&lt;/p&gt;</textarea>
53 <script type="text/javascript">
54 //<![CDATA[
55
56 // This call can be placed at any point after the
57 // <textarea>, or inside a <head><script> in a
58 // window.onload event handler.
59
60 // Replace the <textarea id="editor"> with an CKEditor
61 // instance, using default configurations.
62 CKEDITOR.replace( 'editor1' ,
63 {
64 extraPlugins : 'stylesheetparser',
65 /*
66 * Stylesheet for the contents.
67 */
68 contentsCss : 'assets/parsesample.css',
69 /*
70 * Do not load the default Styles configuration.
71 */
72 stylesSet : []
73 });
74
75 //]]>
76 </script>
77 </p>
78 <p>
79 <input type="submit" value="Submit" />
80 </p>
81 </form>
82 <div id="footer">
83 <hr />
84 <p>
85 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
86 </p>
87 <p id="copy">
88 Copyright &copy; 2003-2011, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
89 Knabben. All rights reserved.
90 </p>
91 </div>
92 </body>
93 </html>