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

Function TextString

packages/editor/src/components/string.tsx:77–85  ·  view source on GitHub ↗
(props: { text: string; isTrailing?: boolean })

Source from the content-addressed store, hash-verified

75 * Leaf strings with text in them.
76 */
77const TextString = (props: { text: string; isTrailing?: boolean }) => {
78 const { text, isTrailing = false } = props
79
80 const getTextContent = () => {
81 return `${text ?? ''}${isTrailing ? '\n' : ''}`
82 }
83
84 return <span {...{ [DATA_EDITABLE_STRING]: true }}>{getTextContent()}</span>
85}
86
87const CompositionString = (props: { text: string }) => {
88 const { text } = props

Callers

nothing calls this directly

Calls 1

getTextContentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…