Ticket #5606: 5606.html

File 5606.html, 1.6 KB (added by Piotrek Koszuliński, 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="../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                <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;? $stuff='stuff'; ?&gt;</textarea>
27                <script>
28
29                        // This call can be placed at any point after the
30                        // <textarea>, or inside a <head><script> in a
31                        // window.onload event handler.
32
33                        // Replace the <textarea id="editor"> with an CKEditor
34                        // instance, using default configurations.
35
36                        CKEDITOR.replace( 'editor1', {
37                                protectedSource: [
38                                        /<\?[\s\S]*?\?>/g
39                                ]
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-2014, <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