Provides Blog avatar for the Editor.js.
Get the package
yarn add @vibesfr/avatar-media
Include module at your application
import AvatarMedia from "@vibesfr/avatar-media";
It requires TailwindCSS to work properly !
## Usage
Add a new Tool to the `tools` property of the Editor.js initial config.
```javascript
var editor = EditorJS({
...
tools: {
...
avatarMedia: AvatarMedia,
}
...
});
config: {
users: yourUsers,
currentUser: yourCurrentUser,
}
-
Change the read time
-
Change the user
Field | Type | Description |
---|---|---|
readTime | integer |
read time duration |
creationDate | string |
creation date formated |
user | object |
user associated to the post |
avatar | string |
avatar url for the user |
{
"type": "avatarMedia",
"data": {
"readTime": "25",
"creationDate": "12 mai 2024",
"user": {
"id": 2,
"name": "Jean Dupont"
},
"avatar": "https://api.dicebear.com/8.x/initials/svg?seed=Jean%20DUPONT"
}
}