MCPcopy Index your code
hub / github.com/editablejs/editable / create

Function create

packages/serializer/src/html.ts:70–81  ·  view source on GitHub ↗
(
    tag: string,
    attributes: HTMLSerializerAttributes = {},
    style?: HTMLSerializerStyle,
    children: string = '',
  )

Source from the content-addressed store, hash-verified

68 },
69
70 create(
71 tag: string,
72 attributes: HTMLSerializerAttributes = {},
73 style?: HTMLSerializerStyle,
74 children: string = '',
75 ) {
76 const attributesString = htmlAttributesToString(attributes)
77 const styleString = style ? cssStyleToString(style) : ''
78 const lineStyle = styleString ? ` style="${styleString}"` : ""
79
80 return `<${tag} ${attributesString}${lineStyle}>${children}</${tag}>`
81 },
82
83 mergeOptions<T = HTMLSerializerAttributes | HTMLSerializerStyle>(
84 node: Node,

Callers

nothing calls this directly

Calls 2

htmlAttributesToStringFunction · 0.90
cssStyleToStringFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…