Ticket #14387: inlinebycodeVertical.html

File inlinebycodeVertical.html, 2.7 KB (added by Jakub Ś, 9 years ago)
Line 
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8        <meta charset="utf-8">
9        <title>Inline Editing by Code &mdash; CKEditor Sample</title>
10        <script src="//cdn.ckeditor.com/4.5.7/full/ckeditor.js""></script>
11        <style>
12                #editable, #editable2, #editable3, #editable4, #editable5, #editable6, #editable7, #editable8, #editable9, #editable10
13                {                       
14                        float: left;
15                        height:50px;
16                        width:300px;
17                        border:1px solid black;
18                }
19                body 
20                {
21                        width: 3500px;
22                }
23
24        </style>
25</head>
26<body>
27        <h1 class="samples">
28                <a href="index.html">CKEditor Samples</a> &raquo; Inline Editing by Code
29        </h1>
30        <div class="warning deprecated">
31                This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/inline.html">brand new version in CKEditor SDK</a>.
32        </div>
33        <div class="description">
34                <p>
35                        This sample shows how to create an inline editor instance of CKEditor. It is created
36                        with a JavaScript call using the following code:
37                </p>
38<pre class="samples">
39// This property tells CKEditor to not activate every element with contenteditable=true element.
40CKEDITOR.disableAutoInline = true;
41
42var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
43</pre>
44                <p>
45                        Note that <code>editable</code> in the code above is the <code>id</code>
46                        attribute of the <code>&lt;div&gt;</code> element to be converted into an inline instance.
47                </p>
48        </div>
49        <div id="editable" contenteditable="true" ></div>
50        <div id="editable2" contenteditable="true" ></div>
51        <div id="editable4" contenteditable="true" ></div>
52        <div id="editable5" contenteditable="true" ></div>
53        <div id="editable6" contenteditable="true" ></div>
54        <div id="editable7" contenteditable="true" ></div>
55        <div id="editable8" contenteditable="true" ></div>
56        <div id="editable9" contenteditable="true" ></div>
57        <div id="editable10" contenteditable="true" ></div>
58
59        <script>
60                // We need to turn off the automatic editor creation first.
61                CKEDITOR.disableAutoInline = true;
62
63                var editor = CKEDITOR.inline( 'editable', {     } );
64               
65                //disable autolinking in IE
66                //editor.on('instanceReady', function( evt ){                   
67                //      editor.document.$.execCommand("AutoUrlDetect", false, false);
68                //});
69        </script>
70        <div id="footer" style="clear:left;">
71                <hr>
72                <p>
73                        CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
74                                http://ckeditor.com</a>
75                </p>
76                <p id="copy">
77                        Copyright &copy; 2003-2015, <a class="samples" href="http://cksource.com/">CKSource</a>
78                        - Frederico Knabben. All rights reserved.
79                </p>
80        </div>
81</body>
82</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy