Ticket #16898: CKEditor_Test.html

File CKEditor_Test.html, 2.8 KB (added by kamalnayan, 7 years ago)

HTML file

Line 
1<!DOCTYPE html>
2<head>
3<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" charset="utf-8">
4<!--Change the file location accordingly-->
5<script src="ckeditor.4.5.7/ckeditor.js"></script>
6<style>
7.editor {
8        padding: 10px;
9min-height: 50px;
10margin: 8px 0;
11color: #222;
12background-color: transparent;
13border: 1px solid #fff;
14word-wrap: break-word !important;
15}
16
17.editor:hover{
18        border: 1px dashed #ccc;
19cursor: text;
20}
21
22.editor body{
23        font-family: georgia;
24font-size: 13px;
25background-color: #fff;
26margin: 0;
27}
28</style>
29</head>
30<body onload="myFunction('editor')">
31<div id="toolbarTest"></div>
32<h1>Business Overview</h1>
33<h3>INTERNAL USE ONLY</h3>
34<div  id="editor" class="editor" onclick = "myFunction('editor')">
35Click Here
36</div>
37<h1>Rating/Outlook History</h1>
38<h3>INTERNAL USE ONLY</h3>
39<div  id="editor1" class="editor" onclick = "myFunction('editor1')">
40Click Here
41</div>
42<h1>Rationale</h1>
43<h3>INTERNAL USE ONLY</h3>
44<div  id="editor2" class="editor" onclick = "myFunction('editor2')">
45Click Here
46</div>
47
48<script type="text/javascript" charset="utf-8">
49
50
51CKEDITOR.config.width="100%";
52CKEDITOR.config.height="500";
53CKEDITOR.config.scayt_autoStartup= true;
54
55CKEDITOR.config.dialogEventFired= false;
56CKEDITOR.config.removePlugins = 'elementspath,magicline';
57CKEDITOR.config.height=50;
58CKEDITOR.config.coreStyles_strike = { element : 'strike' };
59function myFunction(abc) {
60        if(CKEDITOR.instances.editor) {
61                CKEDITOR.instances.editor.destroy();
62        } else if (CKEDITOR.instances.editor1) {
63                CKEDITOR.instances.editor1.destroy();
64        } else if (CKEDITOR.instances.editor2) {
65                CKEDITOR.instances.editor2.destroy();
66        }
67
68        CKEDITOR.replace(abc, {
69                toolbar: [
70                          ['Save'],
71                          ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', 'pasteimage', 'Undo', 'Redo'],
72                          ['Find', 'Replace', 'SelectAll', 'spellcheckerglobal' , 'Scayt'],
73                          ['Image', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'],
74                          ['TextColor', 'BGColor'],
75                          ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', 'RemoveFormat'],
76                          ['NumberedList', 'BulletedList', 'Outdent', 'Indent', 'Blockquote', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'BidiLtr', 'BidiRtl'],
77                          ['Format', 'FontSize', 'Confidential']
78                          ],
79                          resize_enabled: false,
80                          extraPlugins: 'autogrow,spellcheckerglobal,editall,sharedspace,imagepaste,pasteimage',
81                          autoGrow_minHeight: 50,
82                          autoGrow_onStartup: true,
83                          pasteFromWordRemoveStyles: false,
84                          skin: 'kama',
85                          scayt_autoStartup: true,
86
87                          dialogEventFired: false,
88                          sharedSpaces: {
89                                  top: 'toolbarTest'
90                          }
91        });
92}               
93</script>
94
95</body>
96</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy