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

Function createMap

modules/tinymce/src/core/main/ts/api/html/Schema.ts:65–68  ·  view source on GitHub ↗
(defaultValue: string, extendWith: SchemaMap = {})

Source from the content-addressed store, hash-verified

63const makeMap = Tools.makeMap, each = Tools.each, extend = Tools.extend, explode = Tools.explode;
64
65const createMap = (defaultValue: string, extendWith: SchemaMap = {}): SchemaMap => {
66 const value = makeMap(defaultValue, ' ', makeMap(defaultValue.toUpperCase(), ' '));
67 return extend(value, extendWith);
68};
69
70// A curated list using the textBlockElements map and parts of the blockElements map from the schema
71// TODO: TINY-8728 Investigate if the extras can be added directly to the default text block elements

Callers 2

getTextRootBlockElementsFunction · 0.85
createLookupTableFunction · 0.85

Calls 2

extendFunction · 0.85
makeMapFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…