Ticket #12192: 12192-bug_smaller-fixed.html

File 12192-bug_smaller-fixed.html, 1.7 KB (added by Piotr Jasiun, 10 years ago)
Line 
1<!DOCTYPE html>
2<html lang='en' xml:lang='en'>
3<head>
4    <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
5    <script src="https://cdn.ckeditor.com/4.4.2/standard/ckeditor.js"></script>
6    <script type='application/javascript'>
7        CKEDITOR.disableAutoInline = true;
8
9        function downloadFile() {
10            document.getElementById('editor1').blur();
11            document.location = 'data:Application/octet-stream,0';
12        }
13
14        window.onload = function () {
15            editor = CKEDITOR.inline("editor1", {
16                floatSpaceDockedOffsetY: 999999,
17                toolbarGroups: [
18                    { name: 'document', groups: [ 'mode', 'document' ] },                       // Displays document group with its two subgroups.
19                    { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },                     // Group's name will be used to create voice label.
20                    '/',
21                    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
22                    { name: 'links' }
23                ]
24
25            });
26            editor.addCommand('downloadDraft', {
27                exec: downloadFile
28            });
29            editor.ui.addButton('DownloadDraft', {
30                label: 'Download Draft',
31                command: 'downloadDraft',
32                toolbar: 'document,20'
33            });
34        };
35    </script>
36</head>
37<body>
38    <div id='contentwrapper' style="margin-top: 100px;">
39        <div id='editor1' contenteditable="true">
40            <p>Some content blah blah</p>
41        </div>
42        <button onclick="downloadFile()">download file</button>
43        <input type="text" id="text" style="display:none;">
44    </div>
45</body>
46</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy