danielebarchiesi@0
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
danielebarchiesi@0
|
2 <!--
|
danielebarchiesi@0
|
3 Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
danielebarchiesi@0
|
4 For licensing, see LICENSE.html or http://ckeditor.com/license
|
danielebarchiesi@0
|
5 -->
|
danielebarchiesi@0
|
6 <html xmlns="http://www.w3.org/1999/xhtml">
|
danielebarchiesi@0
|
7 <head>
|
danielebarchiesi@0
|
8 <title>ASP integration Samples List — CKEditor</title>
|
danielebarchiesi@0
|
9 <link type="text/css" rel="stylesheet" href="../sample.css" />
|
danielebarchiesi@0
|
10 </head>
|
danielebarchiesi@0
|
11 <body>
|
danielebarchiesi@0
|
12 <h1 class="samples">
|
danielebarchiesi@0
|
13 CKEditor Samples List for ASP — CKEditor Sample
|
danielebarchiesi@0
|
14 </h1>
|
danielebarchiesi@0
|
15 <h2 class="samples">
|
danielebarchiesi@0
|
16 Overview
|
danielebarchiesi@0
|
17 </h2>
|
danielebarchiesi@0
|
18 <p>The ckeditor.asp file provides a wrapper to ease the work of creating CKEditor instances from classic Asp.</p>
|
danielebarchiesi@0
|
19 <p>To use it, you must first include it into your page:
|
danielebarchiesi@0
|
20 <code>
|
danielebarchiesi@0
|
21 <!-- #INCLUDE file="../../ckeditor.asp" -->
|
danielebarchiesi@0
|
22 </code>
|
danielebarchiesi@0
|
23 Of course, you should adjust the path to make it point to the correct location, and maybe use a full path (with virtual="" instead of file="")
|
danielebarchiesi@0
|
24 </p>
|
danielebarchiesi@0
|
25 <p>After that script is included, you can use it in different ways, based on the following pattern:</p>
|
danielebarchiesi@0
|
26
|
danielebarchiesi@0
|
27 <ol>
|
danielebarchiesi@0
|
28 <li>
|
danielebarchiesi@0
|
29 Create an instance of the CKEditor class:
|
danielebarchiesi@0
|
30 <pre class="samples">dim editor
|
danielebarchiesi@0
|
31 set editor = New CKEditor</pre>
|
danielebarchiesi@0
|
32 </li>
|
danielebarchiesi@0
|
33 <li>
|
danielebarchiesi@0
|
34 Set the path to the folder where CKEditor has been installed, by default it will use /ckeditor/
|
danielebarchiesi@0
|
35 <pre class="samples">editor.basePath = "../../"</pre>
|
danielebarchiesi@0
|
36 </li>
|
danielebarchiesi@0
|
37 <li>
|
danielebarchiesi@0
|
38 Now use one of the three main methods to create the CKEditor instances:
|
danielebarchiesi@0
|
39 <ul class="samples">
|
danielebarchiesi@0
|
40 <li>
|
danielebarchiesi@0
|
41 Replace textarea with id (or name) "editor1".
|
danielebarchiesi@0
|
42 <pre class="samples">editor.replaceInstance "editor1"</pre>
|
danielebarchiesi@0
|
43 </li>
|
danielebarchiesi@0
|
44 <li>
|
danielebarchiesi@0
|
45 Replace all textareas with CKEditor.
|
danielebarchiesi@0
|
46 <pre class="samples">editor.replaceAll empty</pre>
|
danielebarchiesi@0
|
47 </li>
|
danielebarchiesi@0
|
48 <li>
|
danielebarchiesi@0
|
49 Create a textarea element and attach CKEditor to it.
|
danielebarchiesi@0
|
50 <pre class="samples">editor.editor "editor1", initialValue</pre>
|
danielebarchiesi@0
|
51 </li>
|
danielebarchiesi@0
|
52 </ul>
|
danielebarchiesi@0
|
53 </li>
|
danielebarchiesi@0
|
54 </ol>
|
danielebarchiesi@0
|
55 <p>Before step 3 you can use a number of methods and properties to adjust the behavior of this class and the CKEditor instances
|
danielebarchiesi@0
|
56 that will be created:</p>
|
danielebarchiesi@0
|
57 <ul class="samples">
|
danielebarchiesi@0
|
58 <li>returnOutput : if set to true, the functions won't dump the code with response.write, but instead they will return it so
|
danielebarchiesi@0
|
59 you can do anything you want</li>
|
danielebarchiesi@0
|
60 <li>basePath: location of the CKEditor scripts</li>
|
danielebarchiesi@0
|
61 <li>initialized: if you set it to true, it means that you have already included the CKEditor.js file into the page and it
|
danielebarchiesi@0
|
62 doesn't have to be generated again.</li>
|
danielebarchiesi@0
|
63 <li>textareaAttributes: You can set here a Dictionary object with the attributes that you want to output in the call to the "editor" method.</li>
|
danielebarchiesi@0
|
64
|
danielebarchiesi@0
|
65 <li>config: Allows to set config values for all the instances from now on.</li>
|
danielebarchiesi@0
|
66 <li>instanceConfig: Allows to set config values just for the next instance.</li>
|
danielebarchiesi@0
|
67
|
danielebarchiesi@0
|
68 <li>addEventHandler: Adds an event handler for all the instances from now on.</li>
|
danielebarchiesi@0
|
69 <li>addInstanceEventHandler: Adds an event handler just for the next instance.</li>
|
danielebarchiesi@0
|
70 <li>addGlobalEventHandler: Adds an event handler for the global CKEDITOR object.</li>
|
danielebarchiesi@0
|
71
|
danielebarchiesi@0
|
72 <li>clearEventHandlers: Removes one or all the event handlers from all the instances from now on.</li>
|
danielebarchiesi@0
|
73 <li>clearInstanceEventHandlers: Removes one or all the event handlers from the next instance.</li>
|
danielebarchiesi@0
|
74 <li>clearGlobalEventHandlers: Removes one or all the event handlers from the global CKEDITOR object.</li>
|
danielebarchiesi@0
|
75
|
danielebarchiesi@0
|
76 </ul>
|
danielebarchiesi@0
|
77
|
danielebarchiesi@0
|
78 <h2 class="samples">
|
danielebarchiesi@0
|
79 Basic Samples
|
danielebarchiesi@0
|
80 </h2>
|
danielebarchiesi@0
|
81 <ul class="samples">
|
danielebarchiesi@0
|
82 <li><a class="samples" href="replace.asp">Replace existing textareas by code</a></li>
|
danielebarchiesi@0
|
83 <li><a class="samples" href="replaceall.asp">Replace all textareas by code</a></li>
|
danielebarchiesi@0
|
84 <li><a class="samples" href="standalone.asp">Create instances in asp</a></li>
|
danielebarchiesi@0
|
85 </ul>
|
danielebarchiesi@0
|
86 <h2 class="samples">
|
danielebarchiesi@0
|
87 Advanced Samples
|
danielebarchiesi@0
|
88 </h2>
|
danielebarchiesi@0
|
89 <ul class="samples">
|
danielebarchiesi@0
|
90 <li><a class="samples" href="advanced.asp">Advanced example</a></li>
|
danielebarchiesi@0
|
91 <li><a class="samples" href="events.asp">Listening to events</a></li>
|
danielebarchiesi@0
|
92 </ul>
|
danielebarchiesi@0
|
93 <div id="footer">
|
danielebarchiesi@0
|
94 <hr />
|
danielebarchiesi@0
|
95 <p>
|
danielebarchiesi@0
|
96 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
danielebarchiesi@0
|
97 </p>
|
danielebarchiesi@0
|
98 <p id="copy">
|
danielebarchiesi@0
|
99 Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
|
danielebarchiesi@0
|
100 </p>
|
danielebarchiesi@0
|
101 </div>
|
danielebarchiesi@0
|
102 </body>
|
danielebarchiesi@0
|
103 </html>
|