Ticket #14851: test.html

File test.html, 1.9 KB (added by Irina, 8 years ago)
Line 
1
2<!DOCTYPE html>
3<!--
4Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
5For licensing, see LICENSE.md or http://ckeditor.com/license
6-->
7<html>
8<head>
9        <title>CKEDITOR.appendTo &mdash; CKEditor Sample</title>
10        <meta charset="utf-8">
11        <script src="http://nightly.ckeditor.com/16-09-08-06-08/full/ckeditor.js"></script>
12        <link rel="stylesheet" href="sample.css">
13</head>
14<body>
15        <h1 class="samples">
16                <a href="index.html">CKEditor Samples</a> &raquo; Append To Page Element Using JavaScript Code
17        </h1>
18        <div id="section1">
19                <div class="description">
20                        <p>
21                                <code>CKEDITOR.appendTo</code> is basically to place editors
22                                inside existing DOM elements. Unlike <code>CKEDITOR.replace</code>,
23                                a target container to be replaced is no longer necessary. A new editor
24                                instance is inserted directly wherever it is desired.
25                        </p>
26<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
27        { /* Configuration options to be used. */ }
28        'Editor content to be used.'
29);</pre>
30                </div>
31                <script>
32
33                        // This call can be placed at any point after the
34                        // <textarea>, or inside a <head><script> in a
35                        // window.onload event handler.
36
37                        // Replace the <textarea id="editor"> with an CKEditor
38                        // instance, using default configurations.
39                        CKEDITOR.appendTo( 'section1',
40                                {
41                        allowedContent : true, //Turn off ACF feature
42                },
43                                '<header><meta charset="utf-8"></meta></header><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
44                        );
45
46                </script>
47        </div>
48        <br>
49        <div id="footer">
50                <hr>
51                <p>
52                        CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
53                </p>
54                <p id="copy">
55                        Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
56                        Knabben. All rights reserved.
57                </p>
58        </div>
59</body>
60</html>
61
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy