PageSourceSearch

https://hub.kinkysalon.com/ckeditor/config.js?v=4.9

js kinkysalon.com collected 2026-09-26 11:50:08 UTC 12,047 bytes, 271 lines download raw bytes

1/**
2 * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3 */
4
5// When pushing edits, modify the random string below to force file re-loading...
6CKEDITOR.timestamp = 'nywidi';
7
8// The following must be at least empty strings or there's an error.
9// These properties are meant to list browsers that needed
10// hacks years ago, but no longer.
11CKEDITOR.skin.ua_editor = '';
12CKEDITOR.skin.ua_dialog = '';
13
14
15// WARNING!
16
17// The file 'ckeditor/lang/en.js' has been MODIFIED at the bottom, after
18// an explanatory comment. Please copy that comment and the lines after it
19// before recompiling the editor from the CKE builder page, and after
20// overwriting the en.js file with the new en.js file, manually add the
21// saved lines to the bottom of the new en.js file.
22// Those lines override certain editor button label texts.
23
24
25// Prepare template and widget arrays for use in adding "external widgets..."
26ml_templatesArray = [
27	['templatelist', 'Template List', 'All ML Templates'],
28	// templatelist MUST remain first in this array, so that it
29	// will appear in the dropdown correctly.
30	// Add template config arrays and optional sub-heading strings below...
31
32	'Default Layouts', // sub-heading
33	['logged_in_home', 'Logged In Home', 'Insert Logged In Home'],
34	['public_home', 'Public Home', 'Insert Public Home'],
35
36	'Group Containers', // sub-heading
37	['panel_container', 'Panel Container', 'Insert Panel Container'],
38	['icon_group', 'Icon Group', 'Insert Icon Group'],
39	// ['icon_with_content', 'Icon with Content', 'Insert Icon with Content'],
40	['triple_photo_block', 'Triple Photo Block', 'Insert Triple Photo Block'],
41	['simple_bullets', 'Simple Bullets', 'Insert Simple Bullets'],
42
43	'Elements', // sub-heading
44	['element_icon_with_label', 'Icon With Label', 'Insert Icon With Label'],
45	['element_slide_up', 'Slide Up', 'Insert Slide Up'],
46	['element_rotate_text', 'Rotate Text', 'Insert Rotate Text'],
47
48	// element_image_with_caption is disabled until animations for it are made...
49	// ['element_image_with_caption', 'Image With Caption', 'Insert Image With Caption'],
50	// email_content_01 still in dev stage...
51	// ['email_content_01', 'Email Content 01', 'Insert Email Content 01'],
52];
53
54ml_widgetsArray = [
55	['widgetlist', 'Widget List', 'All ML Widgets'],
56	// widgetlist MUST remain first in this array, so that it
57	// will appear in the dropdown correctly.
58	// Add widget config arrays and optional sub-heading strings below...
59
60	// WIP ['album_slideshow', 'Album Slideshow', 'Insert Album Slideshow'],
61	// WIP ['partner_events', 'Partner Events', 'Insert Partner Events'],
62	// WIP ['random_album_image_url', 'Random Album Image URL', 'Insert Random Album Image URL'],
63	['daily_calendar', 'Daily Calendar', 'Insert Daily Calendar'],
64	['featured_events', 'Featured Events', 'Insert Featured Events'],
65	['monthly_calendar', 'Monthly Calendar', 'Insert Monthly Calendar'],
66	['new_members', 'New Members', 'Insert New Members'],
67	['news_feed', 'Newsfeed', 'Insert Newsfeed'],
68	['partner_events', 'Partner Events', 'Insert Partner Events'],
69	['sms_opt_in_button', 'SMS Opt In Button', 'Insert SMS Opt In Button'],
70	['social_activity', 'Social Activity', 'Insert Social Activity'],
71	['social_buttons', 'Social Buttons', 'Insert Social Buttons'],
72	['social_media_buttons', 'Social Media Buttons', 'Insert Social Media Buttons'],
73	['subscribe_button', 'Subscribe Button', 'Insert Subscribe Button'],
74	['upcoming_events', 'Upcoming Events', 'Insert Upcoming Events'],
75];
76
77
78// These two arrays cover all non-compiled ML widgets and templates.
79// Each array item can be either an array or a string. If it's a string, the
80// string appears as a non-clickable sub-heading in the dropdown.
81// If the item is an array, it must have three items:
82// [
83//   'widget_name',
84//   'Dropdown Widget Name',
85//   'Title tooltip describing the widget...'
86// ]
87// These three strings are used for settings in
88// several places, for each widget/template.
89
90
91// Loop thru ALL non-compiled widgets/templates, ignore sub-heading
92// strings, and provide CKEDITOR.plugins.addExternal() with TWO ARGS
93// from each of the retained array items:
94// The 'widget_name', and a relative path to the widget folder
95// of the same name inside the mlwidgets folder...
96
97ml_widgetsArray.forEach( (item) => {
98	if (Array.isArray(item)) {
99		CKEDITOR.plugins.addExternal( item[0].trim(), 'mlwidgets/' + item[0].trim() + '/' );
100	}
101});
102
103ml_templatesArray.forEach( (item) => {
104	if (Array.isArray(item)) {
105		CKEDITOR.plugins.addExternal( item[0].trim(), 'mltemplates/' + item[0].trim() + '/' );
106	}
107});
108
109// Add custom and modded plugins...
110CKEDITOR.plugins.addExternal('open_help', 'mlpluginmods/open_help/');
111CKEDITOR.plugins.addExternal('image', 'mlpluginmods/image/');
112CKEDITOR.plugins.addExternal('html5video', 'mlpluginmods/html5video/');
113
114// 
115if (typeof asn2 == 'undefined') {
116	let asn2 = '';
117}
118
119// Enable the video button if site has ASN2...
120asn2 = videoEnabled ? 'Html5video' : '';
121
122// Define ckeditor configuration for all instances...
123CKEDITOR.editorConfig = function( config ) {
124	// https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html
125
126	// Convert all plugin names to comma-separated widget names string
127	// for registering them with config.extraPlugins property...
128
129	// Concat the arrays...
130	let extraPluginsArray = [...ml_widgetsArray, ...ml_templatesArray];
131
132	// Remove all sub-heading strings...
133	extraPluginsArray = extraPluginsArray.filter(item => Array.isArray(item));
134
135	// Convert to comma-separated string of plugin names and assign to config...
136	config.extraPlugins = extraPluginsArray.map(item => item[0].trim()).join();
137
138	// Add special Help button, which pops up the HTML Editor Help Page...
139	config.extraPlugins = config.extraPlugins + ',open_help,image,html5video';
140
141	// Any plugins or widgets not listed below will not appear in the Toolbar.
142	// Plugins within the build need to be referenced here in first-letter caps
143	// in order to have visible buttons in the Toolbar.
144	//
145	// The "name" properties below are not currently used anywhere in the code,
146	// but the groups of buttons they each define will wrap as a single unit and
147	// won't be split across two Toolbar lines, except in very narrow phones.
148
149	config.toolbar_Basic = [ ['Bold', 'Italic', 'Underline', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'BulletedList', 'Font', 'FontSize', 'RemoveFormat','TextColor', 'BGColor', 'openHelp']];
150
151	config.toolbar_Full = [
152		{ name: 'document', items: [ 'Source', 'Save', 'Preview'] },
153		{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText' ] },
154		{ name: 'history', items: [ 'Undo', 'Redo' ] },
155		{ name: 'find', items: [ 'Find' ]},
156		{ name: 'editing', items: [ 'Scayt' ] },
157		{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
158		{ name: 'image', items: [ 'Image', asn2 ] },
159		{ name: 'insert', items: [ 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar' ] },
160		{ name: 'lists', items: [ 'NumberedList', 'BulletedList' ] },
161		{ name: 'inoutdent', items: [ 'Outdent', 'Indent' ] },
162		{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
163		{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline' ] },
164		{ name: 'alignment', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', ] },
165
166		// Group all the dropdowns, looks nicer at different window widths...
167		{ name: 'styles', items: [ 'Styles', 'Font', 'FontSize', 'RemoveFormat' ] },
168
169		{ name: 'maxmin', items: [ 'Maximize' ] },
170		{ name: 'tools', items: [ 'ShowBlocks' ] },
171		{ name: 'help', items: [ 'openHelp' ] },
172	];
173
174	config.toolbar_Advanced = [
175		{ name: 'document', items: [ 'Source', 'Save', 'Preview'] },
176		{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText' ] },
177		{ name: 'history', items: [ 'Undo', 'Redo' ] },
178		{ name: 'find', items: [ 'Find' ]},
179		{ name: 'editing', items: [ 'Scayt' ] },
180		{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
181		{ name: 'image', items: [ 'Image', asn2 ] },
182		{ name: 'insert', items: [ 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar' ] },
183		{ name: 'lists', items: [ 'NumberedList', 'BulletedList' ] },
184		{ name: 'inoutdent', items: [ 'Outdent', 'Indent' ] },
185		{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
186		{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline' ] },
187		{ name: 'alignment', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', ] },
188
189		// Group all the dropdowns, looks nicer at different window widths...
190		{ name: 'styles', items: [ 'Styles', 'Font', 'FontSize', 'TemplateList', 'WidgetList', 'RemoveFormat' ] },
191
192		{ name: 'maxmin', items: [ 'Maximize' ] },
193		{ name: 'tools', items: [ 'ShowBlocks' ] },
194		{ name: 'help', items: [ 'openHelp' ] },
195	];
196
197	config.toolbar_NoWidgets = [
198		{ name: 'document', items: [ 'Source', 'Save', 'Preview'] },
199		{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText' ] },
200		{ name: 'history', items: [ 'Undo', 'Redo' ] },
201		{ name: 'find', items: [ 'Find' ]},
202		{ name: 'editing', items: [ 'Scayt' ] },
203		{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
204		{ name: 'image', items: [ 'Image', asn2 ] },
205		{ name: 'insert', items: [ 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar' ] },
206		{ name: 'lists', items: [ 'NumberedList', 'BulletedList' ] },
207		{ name: 'inoutdent', items: [ 'Outdent', 'Indent' ] },
208		{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
209		{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline' ] },
210		{ name: 'alignment', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', ] },
211
212		// Group all the dropdowns, looks nicer at different window widths...
213		{ name: 'styles', items: [ 'Styles', 'Font', 'FontSize', 'TemplateList', 'RemoveFormat' ] },
214
215		{ name: 'maxmin', items: [ 'Maximize' ] },
216		{ name: 'tools', items: [ 'ShowBlocks' ] },
217		{ name: 'help', items: [ 'openHelp' ] },
218	];
219
220
221	config.skin = 'moono';
222	config.enterMode = CKEDITOR.ENTER_P;
223	config.shiftEnterMode = CKEDITOR.ENTER_BR;
224	config.fillEmptyBlocks = false;
225	config.uploadUrl = '/media_items/upload_from_cke.json';
226	config.filebrowserHtml5videoBrowseUrl = '/media_items/uploads?type=video';
227	config.filebrowserHtml5videoUploadUrl = '/media_items/upload_from_cke.json';
228	config.filebrowserImageBrowseUrl = '/media_items/uploads';
229	config.filebrowserImageUploadUrl = '/media_items/upload_from_cke.json';
230	config.stylesSet = 'ml_styles';
231	config.resize_dir = 'both';
232	config.allowedContent = true;
233	// Allow ALL HTML elements and all their properties, no restrictions.
234	// Must not be exposed to general public due to security concerns!
235	// Disables auto content filtering too.
236
237	// Add plugin names to be disabled (not capitalized)...
238	config.removePlugins = '';
239
240	// Remove some buttons provided by the standard plugins, which are
241	// not needed in the Standard(s) toolbar.
242	config.removeButtons = 'Subscript,Superscript,Strike';
243
244	// Simplify certain dialog windows...
245	config.removeDialogTabs = 'link:advanced';
246
247	// Disable all resize handles other than the editor itself...
248	config.disableObjectResizing = true;
249
250	// Don't let ckeditor change "&" to "&" and similar.
251	config.basicEntities = false;
252
253	// Set MagicLine to show everywhere, then use the data-no-magicline attribute
254	// To prevent it from showing where not wanted, such as following editables
255	// meant to work as a single layout grouping.
256	config.magicline_everywhere = true;
257	config.magicline_tabuList = [ 'data-no-magicline' ];
258
259	config.font_names =
260		'Helvetica/Helvetica Neue, Helvetica, Arial, sans-serif; \
261		Calibri/Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif; \
262		Futura/Futura, Trebuchet MS, Arial, sans-serif; \
263		Garamond/Garamond, Baskerville, Baskerville Old Face, Hoefler Text, Times New Roman, serif; \
264		Times New Roman/TimesNewRoman, Times New Roman, Times, Baskerville, Georgia, serif; \
265		Arial/Arial, Helvetica Neue, Helvetica, sans-serif; \
266		Cambria/Cambria, Georgia, serif; \
267		Verdana/Verdana, Geneva, sans-serif';
268
269	// The Format dropdown options are defined in ckeditor/styles.js
270
271};

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.