Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
-->
<html>
<head>
<metacharset="utf-8">
<title>Append To Page Element Using JavaScript Code — CKEditor Sample</title>
<scriptsrc="../../ckeditor.js"></script>
<linkrel="stylesheet"href="sample.css">
</head>
<body>
<h1class="samples">
<ahref="index.html">CKEditor Samples</a>» Append To Page Element Using JavaScript Code
</h1>
<divclass="warning deprecated">
This sample is not maintained anymore. Check out the <ahref="https://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
</div>
<divid="section1">
<divclass="description">
<p>
The <code><aclass="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><aclass="samples"href="https://docs.ckeditor.com/ckeditor4/docs/#!/api/CKEDITOR-method-replace">CKEDITOR.replace()</a></code>,
a target container to be replaced is no longer necessary. A new editor
instance is inserted directly wherever it is desired.