PageSourceSearch

https://www.orfu.co.nz/Content/ckeditor/noncms_config.js?cb=

js orfu.co.nz collected 2026-09-25 06:06:24 UTC 5,987 bytes, 137 lines download raw bytes

1/**
2 * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.html or http://ckeditor.com/license
4 */
5
6CKEDITOR.editorConfig = function (config) {
7    config.versionCheck = false;
8// Define changes to default configuration here.
9    // For the complete reference:
10    // http://docs.ckeditor.com/#!/api/CKEDITOR.config
11
12    // Referencing the new plugin
13    config.extraPlugins = 'addImage,autogrow,dialog,table,tabletools,panel,floatpanel,panelbutton,colorbutton,font,widget,widgetselection,lineutils,html5audio,notification,notificationaggregator,embedbase,embed,undo,clipboard,autolink,autoembed,sourcedialog';
14
15
16    myFonts = ['Amatic SC', 'Montserrat', 'Raleway', 'Playfair Display', 'Nunito', 'Nunito Sans', 'Arvo', 'Open Sans', 'Roboto Slab', 'Quicksand', 'Lato', 'Oswald', 'Exo2'];
17
18    var addedFonts = [];
19    for (var i = 0; i < myFonts.length; i++) {
20
21        var fontName = myFonts[i].replace(' ', '+');
22
23        if ( myFonts[i] === "Amatic SC" && $("#createNewsletterForm").length > 0 || $("#emailDatabaseModal").length > 0 ) {
24            //dont add it as its not supported in email clients
25        }
26        else {
27            myFonts[i] = '//fonts.googleapis.com/css?family=' + fontName + ":400,400i,700,700i&display=swap";
28            addedFonts.push(myFonts[i]);
29            $("head").append("<link href='" + myFonts[i] + "' rel='stylesheet' type='text/css'>");
30        }
31    }
32   
33    config.contentsCss = ['/content/noncmsCkEditor.css?v=1.0'].concat(addedFonts).concat('/content/google-fonts.css');
34
35    //add custom non google fonts
36    var orgId = $('#OrganisationId').val();
37    if (orgId == 15776 || orgId == 16000 || orgId == 13957) {
38        config.contentsCss = ['/content/noncmsCkEditor.css?v=1.0'].concat(['/content/fonts/hurmefont.css']);
39    }
40
41    if (orgId == 10249) {
42        config.contentsCss = ['/content/noncmsCkEditor.css?v=1.0'].concat(['/content/fonts/foundersgrotesk.css']);
43    }
44
45    if (orgId == 23003) {
46        config.contentsCss = ['/content/noncmsCkEditor.css?v=1.0'].concat(['/content/fonts/campton.css']);
47    }
48
49    config.contentsCss = config.contentsCss.concat(['/content/fonts/spectral.css']);
50
51    // Toolbar configuration generated automatically by the editor based on config.toolbarGroups.
52    config.toolbar = [
53
54        { name: 'basicstyles', groups: ['basicstyles'], items: ['Font', 'FontSize', 'Bold', 'Italic', 'TextColor'] },
55		{ name: 'clipboard', groups: ['undo'], items: ['Undo', 'Redo'] },
56		{ name: 'links', items: ['Link', 'Unlink'] },
57		//'/',
58		{ name: 'paragraph', items: ['NumberedList', 'BulletedList'] },
59		{ name: 'paragraphTwo', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
60
61        { name: 'insert', items: ['Table', 'HorizontalRule', 'html5audio', 'embed', 'addImage'] },
62
63        { name: 'source', items: ['Sourcedialog'] },
64
65        { name: 'custom', items: ['FirstNameButton'] }
66
67    ];
68
69    config.colorButton_colors = '000000,434343,666666,999999,b7b7b7,cccccc,d9d9d9,efefef,f3f3f3,ffffff,' +
70														'9a0000,ff0000,ff9900,ffff00,00ff00,00ffff,4683eb,0000ff,9a00ff,ff00ff,' +
71														'e7b8ae,f5cccb,fde5cc,fff3ca,d9ead2,d0e0e4,c9d9f9,cee2f4,d9d1e9,ead1dc,' +
72														'df7e68,ec9998,fde5cc,ffe694,b5d8a6,a1c4ca,a3c1f6,9ec5ea,b4a6d8,d6a5bd,' +
73														'ce401a,e26564,f8b365,ffda5c,91c57a,74a5b0,6a9ced,6da7de,8e7ac5,c379a0,' +
74														'a81a00,cf0000,e8912a,f2c314,68a94a,42818f,3875db,3983c9,674ba9,a84b79,' +
75														'871f02,9b0000,9b0000,c19100,357714,0e4f5c,0651cf,025196,315777,751847,' +
76														'5c0e00,670000,793f00,806100,264f0e,09343d,194389,033664,200f4e,4d1030';
77
78    CKEDITOR.updateColorPalette(config);
79    config.colorButton_enableMore = false;
80
81    config.fontSize_defaultLabel = '16px';
82    config.font_defaultLabel = 'Times New Roman';
83    if ( $('#hdnFontFamily').length > 0 ) {
84        var sitewideFont = $('#hdnFontFamily').val().split(',')[0];
85        if ( sitewideFont === "Amatic SC" && ($("#createNewsletterForm").length > 0 || $("#emailDatabaseModal").length > 0) )
86            sitewideFont = "Arvo";
87
88        config.font_defaultLabel = sitewideFont;
89        CKEDITOR.addCss('body { font-family: ' + sitewideFont + ' !important; } '
90            + 'body div { font-family: ' + sitewideFont + ' !important; } ' + '');
91    }
92
93    if (CKEDITOR.sportyFontConfig) {
94        CKEDITOR.sportyFontConfig.apply(config);
95    }
96
97    if (CKEDITOR.sportyImageUpload) {
98        CKEDITOR.sportyImageUpload.apply(config);
99    }
100
101    var allowed = 'h1 h2 h3 h4 h5 h6 p ul ol li table hr blockquote strong em; a[!href]';
102    config.pasteFilter = allowed;
103    config.allowedContent = true; // disable ACF (keep pasteFilter for paste sanitisation)
104    // The default plugins included in the basic setup define some buttons that
105    // we don't want too have in a basic editor. We remove them here.
106    //config.removeButtons = 'Anchor,Strike,Subscript,Superscript';
107
108    // Let's have it basic on dialogs as well.
109    config.removeDialogTabs = 'link:advanced';
110    config.forcePasteAsPlainText = false;
111
112    config.pasteFromWordRemoveStyles = false;
113
114    // Don't show annoying Aria-Label title on hover
115    CKEDITOR.config.title = false;
116
117    CKEDITOR.on('instanceReady', function () {
118        $("iframe.cke_wysiwyg_frame").css("background-color", $("#uxBackgroundColor").val());
119    });
120
121
122    CKEDITOR.config.embed_provider = 'https://iframe.ly/api/oembed?url={url}&callback={callback}&api_key=2c4d88a7321c58309fbde9&iframe=1&omit_script=1&omit_css=1'; 
123};
124
125CKEDITOR.updateColorPalette = function (config) {
126    if ($("#SiteId").val() == null)
127        return false;
128
129    var data = JSON.parse($('#CustomColorsJson').val()) || [];
130
131    $(data).each(function () {
132        var hexValue = $(this)[0].HexValue;
133        hexValue = hexValue.substr(1, hexValue.length);
134        // Add custom color to pallette
135        config.colorButton_colors += ',' + hexValue;
136    });
137};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.