# CKEditor Samples » Append To Page Element Using JavaScript Code

`CKEDITOR.appendTo` is basically to place editors inside existing DOM elements. Unlike `CKEDITOR.replace`, a target container to be replaced is no longer necessary. A new editor instance is inserted directly wherever it is desired.

This editor is using an `<iframe>` element based editing area, provided by the Wysiwygarea plugin.

    CKEDITOR.appendTo( 'container_id',
    	{ /* Configuration options to be used. */ }
    	'Editor content to be used.'
    );

Editor 1:
Editor 2:

This editor is using an `<div>` element based editing area, provided by the Divarea plugin.

    CKEDITOR.appendTo( 'container_id',
    	{ extraPlugins: 'divarea' },
    	'Editor content to be used.'
    );