3 Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
\r
4 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
8 <title>CKEDITOR.appendTo — CKEditor Sample</title>
\r
9 <meta charset="utf-8">
\r
10 <script src="../ckeditor.js"></script>
\r
11 <link rel="stylesheet" href="sample.css">
\r
14 <h1 class="samples">
\r
15 <a href="index.html">CKEditor Samples</a> » Append To Page Element Using JavaScript Code
\r
18 <div class="description">
\r
20 <code>CKEDITOR.appendTo</code> is basically to place editors
\r
21 inside existing DOM elements. Unlike <code>CKEDITOR.replace</code>,
\r
22 a target container to be replaced is no longer necessary. A new editor
\r
23 instance is inserted directly wherever it is desired.
\r
25 <pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
\r
26 { /* Configuration options to be used. */ }
\r
27 'Editor content to be used.'
\r
32 // This call can be placed at any point after the
\r
33 // <textarea>, or inside a <head><script> in a
\r
34 // window.onload event handler.
\r
36 // Replace the <textarea id="editor"> with an CKEditor
\r
37 // instance, using default configurations.
\r
38 CKEDITOR.appendTo( 'section1',
\r
40 '<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
\r
49 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
\r
52 Copyright © 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
\r
53 Knabben. All rights reserved.
\r