Built motion from commit 503e72f.|0.0.143
[motion.git] / public / assets / plugins / ckeditor / samples / old / stylesheetparser / stylesheetparser.html
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
4 For licensing, see LICENSE.md or http://ckeditor.com/license
5 -->
6 <html>
7 <head>
8         <meta charset="utf-8">
9         <title>Using Stylesheet Parser Plugin &mdash; CKEditor Sample</title>
10         <script src="../../../ckeditor.js"></script>
11         <script src="../../../samples/old/sample.js"></script>
12         <link rel="stylesheet" href="../../../samples/old/sample.css">
13         <meta name="ckeditor-sample-required-plugins" content="stylescombo">
14         <meta name="ckeditor-sample-name" content="Stylesheet Parser plugin">
15         <meta name="ckeditor-sample-description" content="Using the Stylesheet Parser plugin to fill the Styles drop-down list based on the CSS classes available in the document stylesheet.">
16         <meta name="ckeditor-sample-group" content="Plugins">
17 </head>
18 <body>
19         <h1 class="samples">
20                 <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Using the Stylesheet Parser Plugin
21         </h1>
22         <div class="warning deprecated">
23                 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/styles.html">brand new version in CKEditor SDK</a>.
24         </div>
25         <div class="description">
26                 <p>
27                         This sample shows how to configure CKEditor instances to use the
28                         <strong>Stylesheet Parser</strong> (<code>stylesheetparser</code>) plugin that fills
29                         the <strong>Styles</strong> drop-down list based on the CSS rules available in the document stylesheet.
30                 </p>
31                 <p>
32                         To add a CKEditor instance using the <code>stylesheetparser</code> plugin, insert
33                         the following JavaScript call into your code:
34                 </p>
35 <pre class="samples">
36 CKEDITOR.replace( '<em>textarea_id</em>', {
37         <strong>extraPlugins: 'stylesheetparser'</strong>
38 });</pre>
39                 <p>
40                         Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
41                         the <code>&lt;textarea&gt;</code> element to be replaced with CKEditor.
42                 </p>
43         </div>
44         <form action="../../../samples/sample_posteddata.php" method="post">
45                 <p>
46                         <label for="editor1">
47                                 CKEditor using the <code>stylesheetparser</code> plugin with its default configuration:
48                         </label>
49                         <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>
50                         <script>
51
52                                 // This call can be placed at any point after the
53                                 // <textarea>, or inside a <head><script> in a
54                                 // window.onload event handler.
55
56                                 // Replace the <textarea id="editor"> with an CKEditor
57                                 // instance, using default configurations.
58                                 CKEDITOR.replace( 'editor1' , {
59                                         extraPlugins: 'stylesheetparser',
60
61                                         // Stylesheet for the contents.
62                                         contentsCss: 'assets/sample.css',
63
64                                         // Do not load the default Styles configuration.
65                                         stylesSet: []
66                                 });
67
68                         </script>
69                 </p>
70                 <p>
71                         <input type="submit" value="Submit">
72                 </p>
73         </form>
74         <div id="footer">
75                 <hr>
76                 <p>
77                         CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
78                 </p>
79                 <p id="copy">
80                         Copyright &copy; 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
81                         Knabben. All rights reserved.
82                 </p>
83         </div>
84 </body>
85 </html>