1 |
85ad3d82
|
Assos Assos
|
<!DOCTYPE html>
|
2 |
|
|
|
3 |
d69c481e
|
Florent Torregrosa
|
|
4 |
85ad3d82
|
Assos Assos
|
|
5 |
|
|
|
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 |
85ad3d82
|
Assos Assos
|
<script src="../ckeditor.js"></script>
|
11 |
|
|
<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 |
|
|
<div id="section1">
|
18 |
|
|
<div class="description">
|
19 |
|
|
<p>
|
20 |
d69c481e
|
Florent Torregrosa
|
The <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR-method-appendTo">CKEDITOR.appendTo()</a></code> method serves to to place editors inside existing DOM elements. Unlike <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR-method-replace">CKEDITOR.replace()</a></code>,
|
21 |
85ad3d82
|
Assos Assos
|
a target container to be replaced is no longer necessary. A new editor
|
22 |
|
|
instance is inserted directly wherever it is desired.
|
23 |
|
|
</p>
|
24 |
|
|
<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
|
25 |
|
|
{ /* Configuration options to be used. */ }
|
26 |
|
|
'Editor content to be used.'
|
27 |
|
|
);</pre>
|
28 |
|
|
</div>
|
29 |
|
|
<script>
|
30 |
|
|
|
31 |
|
|
|
32 |
d69c481e
|
Florent Torregrosa
|
|
33 |
|
|
|
34 |
85ad3d82
|
Assos Assos
|
|
35 |
d69c481e
|
Florent Torregrosa
|
|
36 |
|
|
|
37 |
85ad3d82
|
Assos Assos
|
CKEDITOR.appendTo( 'section1',
|
38 |
|
|
null,
|
39 |
|
|
'<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
|
40 |
|
|
);
|
41 |
|
|
|
42 |
|
|
</script>
|
43 |
|
|
</div>
|
44 |
|
|
<br>
|
45 |
|
|
<div id="footer">
|
46 |
|
|
<hr>
|
47 |
|
|
<p>
|
48 |
|
|
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
|
49 |
|
|
</p>
|
50 |
|
|
<p id="copy">
|
51 |
d69c481e
|
Florent Torregrosa
|
Copyright © 2003-2015, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
|
52 |
85ad3d82
|
Assos Assos
|
Knabben. All rights reserved.
|
53 |
|
|
</p>
|
54 |
|
|
</div>
|
55 |
|
|
</body>
|
56 |
|
|
</html>
|