Content · Components
ContentBodyEditor
No summary has been written for ContentBodyEditor. Everything below is generated from the declaration shipped in 0.44.0 and describes the real contract.Public export
typescript
import { ContentBodyEditor } from '@happyvertical/smrt-content/svelte';- Import path
@happyvertical/smrt-content/svelte- Props
- 9
- Props described
- 9 of 9
- Bindable state
- 0
- Callback events
- 5
- Verified release
- 0.44.0
Props
NameTypeRequiredDescription
valuestringYesThe body content string being edited, in HTML or the configured format.formatContentBodyFormat | nullNoFormat of the body content: HTML, Markdown, or auto-detected.placeholderstringNoPlaceholder text shown when the editor is empty.selectedImageIndexnumberNoIndex of the currently selected image in the body, or -1 for none.onChange(change: ContentBodyEditorChange) => voidNoFired when the body content or embedded images change.onOpenImageChooser() => voidNoFired when the user clicks to open the image chooser.onSelectImage(index: number) => voidNoFired when the user selects an image within the body.onUseImageAsThumbnail(assetId: string) => voidNoFired when the user sets an image as the content thumbnail.onResolveImage(selected: ImageLike | File | string) => Promise<unknown> | unknownNoResolves an image file, asset, or ID to a persisted image URL or object.Bindable state
This component has no bindable public state.
Callback events
onChange(change: ContentBodyEditorChange) => voidonOpenImageChooser() => voidonSelectImage(index: number) => voidonUseImageAsThumbnail(assetId: string) => voidonResolveImage(selected: ImageLike | File | string) => Promise<unknown> | unknown