MCPcopy
hub / github.com/tinymce/tinymce / createId

Function createId

modules/tinymce/src/core/main/ts/api/EditorManager.ts:377–385  ·  view source on GitHub ↗
(elm: HTMLElement & { name?: string })

Source from the content-addressed store, hash-verified

375 options.inline && elm.tagName.toLowerCase() in invalidInlineTargets;
376
377 const createId = (elm: HTMLElement & { name?: string }): string => {
378 let id = elm.id;
379
380 if (!id) {
381 id = Obj.get(elm, 'name').filter((name) => !DOM.get(name)).getOrThunk(DOM.uniqueId);
382 elm.setAttribute('id', id);
383 }
384 return id;
385 };
386
387 const execCallback = (name: string) => {
388 const callback = options[name];

Callers 1

initEditorsFunction · 0.85

Calls 3

getOrThunkMethod · 0.80
filterMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…