1.1.1 • Published 6 months ago
@getplate/delta-smart-text v1.1.1
delta-smart-text
This library is part of the Delta Client utility packages. It provides a component to display smart text by using slate
Usage
<DeltaSlateEditor />
Props
The component accepts the following props:
uuid?: string
initialValue?: Descendant[]
//defaults
uuid: () => uuidv4(),
initialValue: () => [
{
type: 'paragraph',
children: [{ text: '' }],
}
],
API
Exposes the following methods:
setValue(value: Descendant[])
setContentTypes(contentTypes: ContentType[])
setContentItemsOfContentType(contentType: string, contentItems: ContentItem[])