Ticket #10436: replacebycode.html

File replacebycode.html, 1.7 KB (added by Jakub Ś, 11 years ago)
Line 
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.html or http://ckeditor.com/license
5-->
6<html>
7<head>
8        <title>Replace Textarea by Code &mdash; CKEditor Sample</title>
9        <meta charset="utf-8">
10        <script src="../ckeditor.js"></script>
11        <link href="sample.css" rel="stylesheet">
12</head>
13<body>
14        <h1 class="samples">
15                <a href="index.html">CKEditor Samples</a> &raquo; Replace Textarea Elements Using JavaScript Code
16        </h1>
17        <form action="sample_posteddata.php" method="post">
18                <div class="description">
19                        <p>
20                                This editor is using an <code>&lt;iframe&gt;</code> element-based editing area, provided by the <strong>Wysiwygarea</strong> plugin.
21                        </p>
22<pre class="samples">
23CKEDITOR.replace( '<em>textarea_id</em>' )
24</pre>
25                </div>
26                <div id="someElementId"></div>
27                <div id="abc"></div>
28                <script>
29
30                        // This call can be placed at any point after the
31                        // <textarea>, or inside a <head><script> in a
32                        // window.onload event handler.
33
34                        // Replace the <textarea id="editor"> with an CKEditor
35                        // instance, using default configurations.
36
37                        CKEDITOR.appendTo( 'abc', {
38                                        extraPlugins: 'sharedspace',
39                                        removePlugins: 'maximize,resize'
40                        });
41
42                </script>
43                <p>
44                        <input type="submit" value="Submit">
45                </p>
46        </form>
47        <div id="footer">
48                <hr>
49                <p>
50                        CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
51                </p>
52                <p id="copy">
53                        Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
54                        Knabben. All rights reserved.
55                </p>
56        </div>
57</body>
58</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy