Ticket #10030: config_draper1.txt

File config_draper1.txt, 4.8 KB (added by Tony Payne, 11 years ago)
Line 
1/*
2Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.html or http://ckeditor.com/license
4*/
5
6/*
7 * 31/05/2012   Tony Payne      (1.0.1)
8 *              Max Window Height Reduced.
9 *              Image icon removed.
10 *              Built in Spell Checker replaced by ieSpell.
11 * 14/06/2012   Tony Payne      (1.0.2)
12 *              Add Browse Server to Link.
13*/
14
15/* Default all Links to "_blank" */
16CKEDITOR.on('dialogDefinition', function ( ev ){
17   if(ev.data.name == 'link'){
18      ev.data.definition.getContents('target').get('linkTargetType')['default']='_blank';
19   }
20}); 
21
22CKEDITOR.on( 'instanceReady', function( ev )
23   {
24      var editor = ev.editor,
25      dataProcessor = editor.dataProcessor,
26      htmlFilter = dataProcessor && dataProcessor.htmlFilter;
27      htmlFilter.addRules({
28         a : function ( element ){
29            element.attributes['target']="_blank";
30         }
31      });
32   });
33
34/*      14/06/2012 Tony Payne
35                Function to read cookies
36*/
37function getCookie(c_name)
38{
39var i,x,y,ARRcookies=document.cookie.split(";");
40for (i=0;i<ARRcookies.length;i++)
41{
42  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
43  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
44  x=x.replace(/^\s+|\s+$/g,"");
45  if (x==c_name)
46    {
47    return unescape(y);
48    }
49  }
50}
51
52var programLocation = getCookie('ProgramLocation');             
53
54
55CKEDITOR.editorConfig = function( config )
56{
57config.extraPlugins = 'autogrow,confighelper,tableresize,iespell';
58config.autoGrow_onStartup = true;
59config.autoGrow_maxHeight = 300;
60config.autoGrow_minHeight = 50;
61config.toolbarCanCollapse = true;
62config.toolbarStartupExpanded = false;
63config.width = 800;
64config.height = 50;
65config.ResizeEnabled = true;
66config.resize_maxWidth = 800;
67config.resize_minHeight = 50;
68config.contentsCss = '../Stylesheets/QA.css';
69config.enterMode = CKEDITOR.ENTER_BR;
70config.disableNativeSpellChecker = false;
71
72// Configure url for FileBrowser plugin
73var baseHref = 'http://www.drapertools.co.uk/';
74//var fullPath = baseHref + 'qatest/php/';
75var fullPath = baseHref + programLocation + '/php/';
76config.filebrowserBrowseUrl      = fullPath + 'ckeditor/filemanager/browser/default/browser.html?Connector=' + fullPath + 'ckeditor/filemanager/connectors/php/connector.php';
77config.filebrowserImageBrowseUrl = fullPath + 'ckeditor/filemanager/browser/default/browser.html?Type=Image&Connector=' + fullPath + 'ckeditor/filemanager/connectors/php/connector.php';
78config.filebrowserFlashBrowseUrl = fullPath + 'ckeditor/filemanager/browser/default/browser.html?Type=Flash&Connector=' + fullPath + 'ckeditor/filemanager/connectors/php/connector.php';
79           
80config.dialogFieldsDefaultValues =
81        {
82                table:
83                        {
84                                info:
85                                        {
86                                                txtWidth : '100%',
87                                                txtCellSpace : '0',
88                                                txtCellPad : '3'
89                                        }
90                        },
91                cellProperties:
92                        {
93                                info:
94                                        {
95                                                vAlign : 'top'
96                                        }
97                        }
98        };
99
100// Cut Down Version Of Special Characters       
101config.specialChars =
102        [
103                '!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/',
104                ':',';',
105                '&lt;','=','&gt;','?','@',
106                '[',']','^','_','`',
107                '{','}','~',
108                "&euro;", "&lsquo;", "&rsquo;", "&ldquo;", "&rdquo;", "&ndash;", "&mdash;", "&cent;", "&pound;", "&uml;", "&copy;", "&ordf;", "&reg;", "&macr;", "&deg;", "&sup2;", "&sup3;", "&acute;", "&para;", "&middot;", "&cedil;", "&sup1;", "&ordm;", "&raquo;", "&times;", "&Oslash;", "&divide;", "&OElig;", "&sbquo;", "&#8219;", "&bdquo;", "&hellip;", "&trade;", "&#9658;", "&bull;", "&rarr;", "&rArr;", "&hArr;", "&diams;", "&asymp;"
109        ];
110// Additional Draper Special Characters
111config.specialChars = config.specialChars.concat( [ "&#10003;","&#181;","&Omega;","&#960;","&frac14;","&frac12;","&frac34;" ]);
112// 1/8 - 7/8 - do not display correctly except in editor
113config.specialChars = config.specialChars.concat( [ "&#x215B;","&#x215C;","&#x215D;","&#x215E;" ] );
114//config.specialChars = config.specialChars.concat( [ "&frac18;","&#8540;","&#8541;","&#8542;" ] );
115       
116       
117config.toolbar = 'QAToolbar';
118config.toolbar_QAToolbar = [
119        { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
120        { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
121        { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
122        { name: 'links', items : [ 'Link','Unlink'] },
123        '/',
124        { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
125        { name: 'colors', items : [ 'TextColor','BGColor' ] },
126        { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','ieSpell'] },
127        { name: 'insert', items : [ 'Table','HorizontalRule','SpecialChar','Image' ] },
128        { name: 'document', items : [ 'Source' ] }
129] ;
130
131
132};
133
134
135
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy