The slate-portive
plugin includes these premade elements that you can use or customize:
ImageBlock
: An Image Element as a void
block
as used in the Getting Started Guide.TitledImageBlock
: An Image Element the same as ImageBlock
but with a title
attribute.ImageInline
: An Image Element as a void
inline
that for custom icons or emojis that should apear inline with Text.AttachmentBlock
: An Attachment Element as a void
block
as used in the Getting Started Guideimport { ImageBlockElement, ImageBlock, createImageBlock } from "slate-portive"
ImageBlockElement
image-block
ImageBlock
createImageBlock
true
false
import {
TitledImageBlockElement,
TitledImageBlock,
createTitledImageBlock,
} from "slate-portive"
titled-image-block
TitledImageBlockElement
TitledImageBlock
createTitledImageBlock
true
false
import {
ImageInlineElement,
ImageInline,
createImageInline,
} from "slate-portive"
image-inline
ImageInlineElement
ImageInline
createImageInline
true
true
import {
AttachmentBlockElement,
AttachmentBlock,
createAttachmentBlock,
} from "slate-portive"
attachment-block
AttachmentBlockElement
AttachmentBlock
createAttachmentBlock
true
false