1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
3 | <head> |
---|
4 | <title>CMC CMS Text Editor</title> |
---|
5 | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
---|
6 | <script type="text/javascript" src="http://ckeditor.com/apps/ckeditor/3.6.1/ckeditor.js?1310005118"></script> |
---|
7 | <script type="text/javascript" src="http://ckeditor.com/apps/ckeditor/3.6.1/check.js?1310005118"></script> |
---|
8 | <script type="text/javascript"> |
---|
9 | // Get the request items |
---|
10 | var element = "RBXVZEyM"; |
---|
11 | var mode = "edit2"; |
---|
12 | var site_path = "../sites/4plus1"; |
---|
13 | var config = "[['Source','SpellChecker','-','Undo','Redo','Find','Replace','-','Cut','Copy','PasteText','-','Bold','Italic','Underline','NumberedList','BulletedList','-','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','HorizontalRule','PageBreak','Link','Unlink','Anchor','-','Image','Table','Templates','Format','-','About']]"; |
---|
14 | var sessid = "1900da6e0c252e22423b5874186d7c2a"; |
---|
15 | |
---|
16 | // Make the editor instance global |
---|
17 | var instance; |
---|
18 | |
---|
19 | // Make the editor instance copy global |
---|
20 | var editor; |
---|
21 | |
---|
22 | function createEditor() |
---|
23 | { |
---|
24 | if (editor) return; |
---|
25 | // Initialize the HTML for this instance |
---|
26 | var html = '<p>dgdgfdv dsfdshfhds dsfjdsbfjds dsfdsfdsf djfdhsfdshfbs dsjhfdsfhdsf dshfsdfhsdf</p> '; |
---|
27 | |
---|
28 | // Setup the configurations for this instance |
---|
29 | CKEDITOR.config.toolbar = eval(config); |
---|
30 | |
---|
31 | CKEDITOR.config.forcePasteAsPlainText = true; |
---|
32 | editor = CKEDITOR.appendTo('div_editor'); |
---|
33 | editor.setData(html); |
---|
34 | for (var i in CKEDITOR.instances) |
---|
35 | { |
---|
36 | instance = CKEDITOR.instances[i]; |
---|
37 | } |
---|
38 | |
---|
39 | // Listen for the ckeditor instance to be ready |
---|
40 | instance.on('instanceReady', function() |
---|
41 | { |
---|
42 | // Zooming causes content to scroll outside of cke_wrapper when view source is clicked |
---|
43 | $('.cke_wrapper').css('overflow', 'hidden'); |
---|
44 | |
---|
45 | $('a').click(function() |
---|
46 | { |
---|
47 | $('#cke_contents_editor1').css('max-height', '200px'); |
---|
48 | $('#cke_contents_editor1').css('overflow', 'hidden');//THE LINE CAUSING THE PROBLEM. |
---|
49 | }); |
---|
50 | }); |
---|
51 | } |
---|
52 | </script> |
---|
53 | |
---|
54 | <!-- Append the editor specific styles --> |
---|
55 | <style type="text/css"> |
---|
56 | div#properties { |
---|
57 | float: left; |
---|
58 | background-color: #EEE; |
---|
59 | width: 30%; |
---|
60 | height: 100%; |
---|
61 | padding: 10px; |
---|
62 | } |
---|
63 | div#properties h1 { |
---|
64 | font-weight: bold; |
---|
65 | font-size: 15px; |
---|
66 | clear: right; |
---|
67 | } |
---|
68 | div#properties input, div#properties textarea { |
---|
69 | margin: 5px; |
---|
70 | } |
---|
71 | div#preview { |
---|
72 | float: left; |
---|
73 | background-color: #CCC; |
---|
74 | width: 60%; |
---|
75 | height: 100%; |
---|
76 | padding: 10px; |
---|
77 | } |
---|
78 | div#preview h1 { |
---|
79 | font-weight: bold; |
---|
80 | font-size: 15px; |
---|
81 | clear: right; |
---|
82 | } |
---|
83 | body { |
---|
84 | background-color: #EBF4FB; |
---|
85 | } |
---|
86 | input.sys{ |
---|
87 | margin: 10px; |
---|
88 | } |
---|
89 | </style> |
---|
90 | |
---|
91 | </head> |
---|
92 | <body> |
---|
93 | <!-- Begin the editor --> |
---|
94 | <div class="editor"> |
---|
95 | <div id="div_editor" style="overflow: hidden;"></div> |
---|
96 | <script type="text/javascript"> |
---|
97 | createEditor(); |
---|
98 | </script> |
---|
99 | <input type="submit" class="sys" id="save-div" value="Submit" /> |
---|
100 | <input type="submit" class="sys" id="close-win" value="Cancel" /> |
---|
101 | </div> |
---|
102 | <!-- End the editor --> |
---|
103 | </body> |
---|
104 | </html> |
---|