Skip to content

Commit f8d88f1

Browse files
committed
Revert "[ADD] evo links plugin"
This reverts commit 51ba333.
1 parent b271c8d commit f8d88f1

4 files changed

Lines changed: 1 addition & 838 deletions

File tree

public/connectors/evolinks-search.php

Lines changed: 0 additions & 113 deletions
This file was deleted.

public/js/etinymce-init.js

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -257,38 +257,6 @@
257257
var profiles = window.eTinyMCEProfiles || {};
258258
var defaultKey = cfg.defaultProfile || '';
259259

260-
function normalizePluginList(value) {
261-
if (Array.isArray(value)) {
262-
return value.slice();
263-
}
264-
if (typeof value === 'string') {
265-
return value.split(/[\\s,]+/).filter(Boolean);
266-
}
267-
return [];
268-
}
269-
270-
function ensurePlugin(options, pluginName) {
271-
var list = normalizePluginList(options.plugins);
272-
if (list.indexOf(pluginName) === -1) {
273-
list.push(pluginName);
274-
}
275-
options.plugins = list.join(' ');
276-
}
277-
278-
function ensureExternalPlugin(options, name, url) {
279-
if (!url) {
280-
return;
281-
}
282-
var external = options.external_plugins;
283-
if (!external || typeof external !== 'object') {
284-
external = {};
285-
}
286-
if (!external[name]) {
287-
external[name] = url;
288-
}
289-
options.external_plugins = external;
290-
}
291-
292260
queue.forEach(function (item) {
293261
var profileKey = item.profile;
294262
if (!profiles[profileKey]) {
@@ -301,26 +269,7 @@
301269
}
302270
}
303271

304-
var profileOptions = Object.assign({}, profiles[profileKey] || {});
305-
var evolinksDefaults = {
306-
searchUrl: normalizedBaseUrl + '/assets/plugins/eTinyMCE/connectors/evolinks-search.php',
307-
minChars: 2,
308-
debounce: 250,
309-
limit: 10,
310-
outputMode: 'placeholder',
311-
includeUnpublished: false,
312-
enableTree: true,
313-
cacheSize: 20
314-
};
315-
316-
var evolinksOverrides = {};
317-
if (profileOptions.evolinks && typeof profileOptions.evolinks === 'object') {
318-
evolinksOverrides = Object.assign({}, profileOptions.evolinks);
319-
}
320-
if (item.options && item.options.evolinks && typeof item.options.evolinks === 'object') {
321-
evolinksOverrides = Object.assign(evolinksOverrides, item.options.evolinks);
322-
}
323-
profileOptions.evolinks = Object.assign({}, evolinksDefaults, evolinksOverrides);
272+
var profileOptions = profiles[profileKey] || {};
324273
var baseOptions = {
325274
selector: item.selectors,
326275
file_picker_callback: window.eTinyMCEFilePicker,
@@ -329,9 +278,6 @@
329278
};
330279

331280
var initOptions = Object.assign({}, profileOptions, item.options || {}, baseOptions);
332-
var evolinksUrl = normalizedBaseUrl + '/assets/plugins/eTinyMCE/js/evolinks/plugin.js';
333-
ensureExternalPlugin(initOptions, 'evolinks', evolinksUrl);
334-
ensurePlugin(initOptions, 'evolinks');
335281
tinymce.init(initOptions);
336282
});
337283
})();

0 commit comments

Comments
 (0)