} />
)
}
const Leaf = ({ attributes, children, leaf }) => {
const highlightLeaf = leaf
return (
{children}
)
}
const initialValue = [
{
type: 'paragraph',
children: [
{
text: 'This is editable text that you can search. As you search, it looks for matching strings of text, and adds ',
},
{ text: 'decorations', bold: true },
{ text: ' to them in realtime.' },
],
},
{
type: 'paragraph',
children: [
{ text: 'Try it out for yourself by typing in the search box above!' },
],
},
]
export default SearchHighlightingExample