MCPcopy
hub / github.com/tinymce/tinymce / findTargets

Function findTargets

modules/tinymce/src/core/main/ts/api/EditorManager.ts:397–417  ·  view source on GitHub ↗
(options: RawEditorOptions)

Source from the content-addressed store, hash-verified

395 };
396
397 const findTargets = (options: RawEditorOptions): HTMLElement[] => {
398 if (Env.browser.isIE() || Env.browser.isEdge()) {
399 ErrorReporter.initError(
400 'TinyMCE does not support the browser you are using. For a list of supported' +
401 ' browsers please see: https://www.tiny.cloud/docs/tinymce/8/support/#supportedwebbrowsers'
402 );
403 return [];
404 } else if (isQuirksMode) {
405 ErrorReporter.initError(
406 'Failed to initialize the editor as the document is not in standards mode. ' +
407 'TinyMCE requires standards mode.'
408 );
409 return [];
410 } else if (Type.isString(options.selector)) {
411 return DOM.select(options.selector);
412 } else if (Type.isNonNullable(options.target)) {
413 return [ options.target ];
414 } else {
415 return [];
416 }
417 };
418
419 let provideResults = (editors: Editor[]) => {
420 result = editors;

Callers 1

initEditorsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…