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