1.0.6 • Published 11 months ago
strapi-plugin-slugify-richtext v1.0.6
Strapi plugin slugify-from-richtext
Adding a custom field 'Slug from richText', which is populated automatically from a field of type 'richText'.
Plugin registration
export default {
// ...
'slugify-from-richtext': {
enabled: true,
resolve: './src/plugins/slugify-from-richtext'
},
// ...
}
Using the plugin
Example in the content-type of a collection :
"myDescription": {
"type": "richtext"
},
"myGenerateTitle": {
"type": "customField",
"customField": "plugin::slugify-from-richtext.slug",
"relatedTo": "myDescription",
"wordJoiner": "_",
"wordMaxNb": 2,
"hidden": true,
"removeSpecialCharacters": false,
"removeUpperCase": false,
"removeAccents": false,
"addEllipsis": true
}
Facultative parameters (and their default value)
- wordJoiner: "-"
- wordMaxNb: 4
- hidden: false
- removeSpecialCharacters: false
- removeUpperCase: false
- removeAccents: false
- addEllipsis: false