Ticket #11993: replacebycode.html

File replacebycode.html, 1.9 KB (added by Wiktor Walc, 10 years ago)
Line 
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8        <meta charset="utf-8">
9        <title>Replace Textarea by Code &mdash; CKEditor Sample</title>
10        <script src="//cdn.ckeditor.com/4.4.1/standard/ckeditor.js"></script>
11</head>
12<body>
13<h1 class="samples">
14        <a href="index.html">CKEditor Samples</a> &raquo; Replace Textarea Elements Using JavaScript Code
15</h1>
16<form action="sample_posteddata.php" method="post">
17        <div class="description">
18                <p>
19                        This editor is using an <code>&lt;iframe&gt;</code> element-based editing area, provided by the <strong>Wysiwygarea</strong> plugin.
20                </p>
21
22<pre class="samples">
23CKEDITOR.replace( '<em>textarea_id</em>' )
24</pre>
25        </div>
26        <div style="height: 400px; overflow-y: scroll;">
27                <p>
28                        <strong>Copy this single line and paste into CKEditor in Google Chrome</strong>
29                </p>
30                <p>
31                        Some text
32                </p>
33                <p>
34                        Some text
35                </p>
36                <p>
37                        Some text
38                </p>
39                <p>
40                        Some text
41                </p>
42                <p>
43                        Some text
44                </p>
45
46                <textarea cols="80" id="editor1" name="editor1" rows="100">
47        </textarea>
48        </div>
49        <script>
50
51                // This call can be placed at any point after the
52                // <textarea>, or inside a <head><script> in a
53                // window.onload event handler.
54
55                // Replace the <textarea id="editor"> with an CKEditor
56                // instance, using default configurations.
57
58                CKEDITOR.replace( 'editor1', {
59                        height: 800
60                } );
61
62        </script>
63        <p>
64                <input type="submit" value="Submit">
65        </p>
66</form>
67<div id="footer">
68        <hr>
69        <p>
70                CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
71        </p>
72        <p id="copy">
73                Copyright &copy; 2003-2014, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
74                Knabben. All rights reserved.
75        </p>
76</div>
77</body>
78</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy