MCPcopy Index your code
hub / github.com/tinymce/tinymce / addCustomElements

Function addCustomElements

modules/tinymce/src/core/main/ts/api/html/Schema.ts:328–341  ·  view source on GitHub ↗
(customElements: string | Record<string, CustomElementSpec> | undefined)

Source from the content-addressed store, hash-verified

326 };
327
328 const addCustomElements = (customElements: string | Record<string, CustomElementSpec> | undefined) => {
329 if (Type.isObject(customElements)) {
330 Obj.each(customElements as Record<string, CustomElementSpec>, (spec, name) => {
331 const componentUrl = spec.componentUrl;
332 if (Type.isString(componentUrl)) {
333 addComponentUrl(name, componentUrl);
334 }
335
336 addCustomElement(name, spec);
337 });
338 } else if (Type.isString(customElements)) {
339 addCustomElementsFromString(customElements);
340 }
341 };
342
343 // Adds valid children to the schema object
344 const addValidChildren = (validChildren: string | undefined) => {

Callers 1

setupFunction · 0.85

Calls 4

addComponentUrlFunction · 0.85
addCustomElementFunction · 0.85
eachMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…