1 |
85ad3d82
|
Assos Assos
|
<!DOCTYPE html>
|
2 |
|
|
|
3 |
b986a83e
|
Florent Torregrosa
|
|
4 |
|
|
|
5 |
85ad3d82
|
Assos Assos
|
|
6 |
|
|
<html>
|
7 |
|
|
<head>
|
8 |
|
|
<meta charset="utf-8">
|
9 |
d69c481e
|
Florent Torregrosa
|
<title>Append To Page Element Using JavaScript Code — CKEditor Sample</title>
|
10 |
0aee3c58
|
Assos Assos
|
<script src="../../ckeditor.js"></script>
|
11 |
85ad3d82
|
Assos Assos
|
<link rel="stylesheet" href="sample.css">
|
12 |
|
|
</head>
|
13 |
|
|
<body>
|
14 |
|
|
<h1 class="samples">
|
15 |
|
|
<a href="index.html">CKEditor Samples</a> » Append To Page Element Using JavaScript Code
|
16 |
|
|
</h1>
|
17 |
0aee3c58
|
Assos Assos
|
<div class="warning deprecated">
|
18 |
b986a83e
|
Florent Torregrosa
|
This sample is not maintained anymore. Check out the <a href="https://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
|
19 |
0aee3c58
|
Assos Assos
|
</div>
|
20 |
85ad3d82
|
Assos Assos
|
<div id="section1">
|
21 |
|
|
<div class="description">
|
22 |
|
|
<p>
|
23 |
b986a83e
|
Florent Torregrosa
|
The <code><a class="samples" href="https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR-method-appendTo">CKEDITOR.appendTo()</a></code> method serves to to place editors inside existing DOM elements. Unlike <code><a class="samples" href="https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR-method-replace">CKEDITOR.replace()</a></code>,
|
24 |
85ad3d82
|
Assos Assos
|
a target container to be replaced is no longer necessary. A new editor
|
25 |
|
|
instance is inserted directly wherever it is desired.
|
26 |
|
|
</p>
|
27 |
|
|
<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
|
28 |
|
|
{ /* Configuration options to be used. */ }
|
29 |
|
|
'Editor content to be used.'
|
30 |
|
|
);</pre>
|
31 |
|
|
</div>
|
32 |
|
|
<script>
|
33 |
|
|
|
34 |
|
|
|
35 |
d69c481e
|
Florent Torregrosa
|
|
36 |
|
|
|
37 |
85ad3d82
|
Assos Assos
|
|
38 |
d69c481e
|
Florent Torregrosa
|
|
39 |
|
|
|
40 |
85ad3d82
|
Assos Assos
|
CKEDITOR.appendTo( 'section1',
|
41 |
|
|
null,
|
42 |
b986a83e
|
Florent Torregrosa
|
'<p>This is some <strong>sample text</strong>. You are using <a href="https://ckeditor.com/">CKEditor</a>.</p>'
|
43 |
85ad3d82
|
Assos Assos
|
);
|
44 |
|
|
|
45 |
|
|
</script>
|
46 |
|
|
</div>
|
47 |
|
|
<br>
|
48 |
|
|
<div id="footer">
|
49 |
|
|
<hr>
|
50 |
|
|
<p>
|
51 |
b986a83e
|
Florent Torregrosa
|
CKEditor - The text editor for the Internet - <a class="samples" href="https://ckeditor.com/">https://ckeditor.com</a>
|
52 |
85ad3d82
|
Assos Assos
|
</p>
|
53 |
|
|
<p id="copy">
|
54 |
b986a83e
|
Florent Torregrosa
|
Copyright © 2003-2018, <a class="samples" href="https://cksource.com/">CKSource</a> - Frederico
|
55 |
85ad3d82
|
Assos Assos
|
Knabben. All rights reserved.
|
56 |
|
|
</p>
|
57 |
|
|
</div>
|
58 |
|
|
</body>
|
59 |
|
|
</html>
|