1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/ckeditor/samples/old/appendto.html Thu Dec 15 18:10:20 2016 +0300
1.3 @@ -0,0 +1,59 @@
1.4 +<!DOCTYPE html>
1.5 +<!--
1.6 +Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
1.7 +For licensing, see LICENSE.md or http://ckeditor.com/license
1.8 +-->
1.9 +<html>
1.10 +<head>
1.11 + <meta charset="utf-8">
1.12 + <title>Append To Page Element Using JavaScript Code — CKEditor Sample</title>
1.13 + <script src="../../ckeditor.js"></script>
1.14 + <link rel="stylesheet" href="sample.css">
1.15 +</head>
1.16 +<body>
1.17 + <h1 class="samples">
1.18 + <a href="index.html">CKEditor Samples</a> » Append To Page Element Using JavaScript Code
1.19 + </h1>
1.20 + <div class="warning deprecated">
1.21 + This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
1.22 + </div>
1.23 + <div id="section1">
1.24 + <div class="description">
1.25 + <p>
1.26 + 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>,
1.27 + a target container to be replaced is no longer necessary. A new editor
1.28 + instance is inserted directly wherever it is desired.
1.29 + </p>
1.30 +<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
1.31 + { /* Configuration options to be used. */ }
1.32 + 'Editor content to be used.'
1.33 +);</pre>
1.34 + </div>
1.35 + <script>
1.36 +
1.37 + // This call can be placed at any point after the
1.38 + // DOM element to append CKEditor to or inside the <head><script>
1.39 + // in a window.onload event handler.
1.40 +
1.41 + // Append a CKEditor instance using the default configuration and the
1.42 + // provided content to the <div> element of ID "section1".
1.43 + CKEDITOR.appendTo( 'section1',
1.44 + null,
1.45 + '<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
1.46 + );
1.47 +
1.48 + </script>
1.49 + </div>
1.50 + <br>
1.51 + <div id="footer">
1.52 + <hr>
1.53 + <p>
1.54 + CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
1.55 + </p>
1.56 + <p id="copy">
1.57 + Copyright © 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
1.58 + Knabben. All rights reserved.
1.59 + </p>
1.60 + </div>
1.61 +</body>
1.62 +</html>