MCPcopy Create free account
hub / github.com/editablejs/editable / ZeroWidthString

Function ZeroWidthString

packages/editor/src/components/string.tsx:96–106  ·  view source on GitHub ↗
(props: { length?: number; isLineBreak?: boolean })

Source from the content-addressed store, hash-verified

94 */
95
96const ZeroWidthString = (props: { length?: number; isLineBreak?: boolean }) => {
97 const { length = 0, isLineBreak = false } = props
98 return (
99 <span
100 {...{ [DATA_EDITABLE_ZERO_WIDTH]: isLineBreak ? 'n' : 'z', [DATA_EDITABLE_LENGTH]: length }}
101 >
102 {'\uFEFF'}
103 {isLineBreak ? <br /> : null}
104 </span>
105 )
106}
107
108export default String

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…