Ticket #14387: inlinebycodeVerticalShared.html

File inlinebycodeVerticalShared.html, 2.9 KB (added by Jakub Ś, 8 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-all/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               
20                #someElementId
21                {
22                        position : fixed;
23                        top: 150px;
24                        left:200px;
25                }
26               
27                body 
28                {
29                        width: 3500px;
30                }
31
32        </style>
33</head>
34<body>
35        <h1 class="samples">
36                <a href="index.html">CKEditor Samples</a> &raquo; Inline Editing by Code
37        </h1>
38        <div class="warning deprecated">
39                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>.
40        </div>
41        <div class="description">
42                <p>
43                        This sample shows how to create an inline editor instance of CKEditor. It is created
44                        with a JavaScript call using the following code:
45                </p>
46<pre class="samples">
47// This property tells CKEditor to not activate every element with contenteditable=true element.
48CKEDITOR.disableAutoInline = true;
49
50var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
51</pre>
52                <p>
53                        Note that <code>editable</code> in the code above is the <code>id</code>
54                        attribute of the <code>&lt;div&gt;</code> element to be converted into an inline instance.
55                </p>
56        </div>
57        <div id="someElementId"></div>
58       
59        <div id="editable" contenteditable="true" ></div>
60        <div id="editable2" contenteditable="true" ></div>
61        <div id="editable4" contenteditable="true" ></div>
62        <div id="editable5" contenteditable="true" ></div>
63        <div id="editable6" contenteditable="true" ></div>
64        <div id="editable7" contenteditable="true" ></div>
65        <div id="editable8" contenteditable="true" ></div>
66        <div id="editable9" contenteditable="true" ></div>
67        <div id="editable10" contenteditable="true" ></div>
68
69        <script>
70                // We need to turn off the automatic editor creation first.
71                CKEDITOR.disableAutoInline = true;
72
73                var editor = CKEDITOR.inline( 'editable', {
74                        extraPlugins: 'sharedspace',
75                        sharedSpaces : {
76                                top: 'someElementId'
77                        }
78                } );
79               
80                //disable autolinking in IE
81                //editor.on('instanceReady', function( evt ){                   
82                //      editor.document.$.execCommand("AutoUrlDetect", false, false);
83                //});
84        </script>
85        <div id="footer" style="clear:left;">
86                <hr>
87                <p>
88                        CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
89                                http://ckeditor.com</a>
90                </p>
91                <p id="copy">
92                        Copyright &copy; 2003-2015, <a class="samples" href="http://cksource.com/">CKSource</a>
93                        - Frederico Knabben. All rights reserved.
94                </p>
95        </div>
96</body>
97</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy