1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-18 13:11:17 +02:00

[fix/add-image-details-to-changes-guide] add extra details on how to … (#1870)

* [fix/add-image-details-to-changes-guide] add extra details on how to insert an image into a Slate Value.

* [fix/add-image-details-to-changes-guide] fix linting errors with Prettier

* Update changes.md

* Update changes.md
This commit is contained in:
Dominic Eden
2018-06-11 00:59:35 +01:00
committed by Ian Storm Taylor
parent 7f91d0b557
commit 5b03db6e36

View File

@@ -25,7 +25,15 @@ change
.moveToOffsets(10, 14) .moveToOffsets(10, 14)
.addMark('bold') .addMark('bold')
.collapseToEndOfBlock() .collapseToEndOfBlock()
.insertBlock({ type: 'image', isVoid: true }) .insertBlock({
type: 'image',
isVoid: true,
data: {
src: 'http://placekitten.com/200/300',
alt: 'Kittens',
className: 'img-responsive',
},
})
.insertBlock('paragraph') .insertBlock('paragraph')
``` ```