You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Bump version number (alpha)
* Fix code block ending
* Custom Fields - User Guide: All updates (#1039)
* Keep old version number for now
* Fix rendering issue caused by missing blank line after code block
* [WIP] Custom Fields: Updates to Content-Type Builder documentation (#1018)
* Add custom fields h2
* Replace field selection screenshot
* Update "Configuring fields for content-types"
* Add TODO for possible "managing custom fields" content
* Reword marketplace mention and fix link
* Fix rendering issue caused by missing blank line after code block
* Delete deprecated comments
* Mention custom fields in the Content Manager (#1051)
* Update version number
* Delete TODO as link now works
* Mention custom fields in plugins introduction
* Mention that custom fields can also be added to components
* Update "Installing plugins via Marketplace" with custom fields
* Mention custom fields in Global settings
* Clean up completed TODOs
* Exclude non-related content
* Fix email closing (not-related to CF)
* Update wording (removing "all")
* Treat custom fields as part of plugins
* Update description for "other plugins" settings
* Revert screenshot change
No custom fields tab in in-app Marketplace
* Remove unused screenshot for "custom fields" settings
* Fix what → which
Co-authored-by: Shaun Brown <[email protected]>
* Fix: filling up → filling out
* Update built-in → pre-installed
Co-authored-by: Shaun Brown <[email protected]>
* Custom Fields - Dev docs: All updates (#1036)
* Add custom fields to TOC
* Fix unclosed array in TOC config
* Prepare TOC for upcoming content
* Custom fields - Dev docs: Add a new Development > Custom Fields page (#1035)
* WIP
* Add WIP reference and example guide for custom fields
* Delete old file, now splitted into reference and guide
* Improve reference guide
* Add first draft of color picker custom fields guide
* Improve reference documentation
* Improve example guide
* Mention custom fields in plugins development
* Fix TOC casing
* Remove tutorial and update sidebar and "main" doc file name
* Temporarily remove callout for tutorial
* Improve custom fields reference documentation
* Further improve custom fields reference documentation
* Update first note with a mention to app-specific custom fields
* Add prerequisites (plugin)
* Update `items` table
* Add multimarkdown support + prepare for documenting all settings fields
* Improve introduction
* Improve `plugin` key description
* Delete deprecated TODOs
* Fix paths in example code
* Update wording: settings → options
* Improve `options` table
* Update prerequisites to also mention enabling plugin
* Remove callout from plugins dev, will be moved to another PR
* Reword introduction sentence
Co-authored-by: markkaylor <[email protected]>
* Reword models attributes intro. description
Co-authored-by: markkaylor <[email protected]>
* Fix preposition and singular usage
Co-authored-by: markkaylor <[email protected]>
* Update text → string in color picker example
* Mention `media` can't be used as a data type
* Add `media` to the list of forbidden data types
* Update validator code example
Co-authored-by: markkaylor <[email protected]>
* Remove question comment about inline components
* Update string → text
* Remove View component
* Finish removing View component and update "Components" section
* Improve mention of non-usable data types
* Remove bootstrap() and mention src/admin/app.s
* Add link to user guide + mention CF can be added to components
* Remove some comments
* Replace bootstrap() with register()
* Mention yup
* Improve settings items description
* Remove note about not being able to import custom input components
* Improve `options` description and code example
* Fix user guide link (no #)
* Update schema.json → schema
* Remove non-relevant TODO
* Update strapi code base links
* Don't mention what happens if `plugin` is omitted in server
* Simplify callouts
* Fix CTB spelling
Co-authored-by: Shaun Brown <[email protected]>
* Move note about forbidden data types into the table
* Fix 'can not' → 'cannot'
* Fix: can't → cannot
* Add tip for `Input` component props
Co-authored-by: markkaylor <[email protected]>
Co-authored-by: Shaun Brown <[email protected]>
* Custom fields - Dev docs: Updates to Backend customization > Models (#1052)
* Add a few draft lines about impact on models
* Add custom fields section to models attributes docs
* Add custom fields to the list of types availables in schema.json
* Fix typo in customField parameter name
* Replace `custom field` by `customField` in table
* Fix uid for global field name
* Fix gerundive
Co-authored-by: Shaun Brown <[email protected]>
* Improve description of plugin/global uids
* Fix duplicate content
Co-authored-by: Shaun Brown <[email protected]>
* Custom fields - Dev docs: Minor updates and cross-links (#1053)
* Mention custom fields in server and admin panel APIs for plugins
* Mention custom fields in plugins development
* Mention custom fields in the global register() and bootstrap() methods
* Register a custom field in admin with register(), not bootstrap()
* Add registering admin panel part of a CF to available actions
* Fix: custom fields are registered in register(), not bootstrap()
* Improve intro. sentence for bootstrap()
Co-authored-by: markkaylor <[email protected]>
Co-authored-by: Shaun Brown <[email protected]>
* Remove multimarkdown plugin
* Remove markdown-it dependency
* Fix broken link
* Add tip about publishing a plugin on npm
* Update version number
Co-authored-by: Shaun Brown <[email protected]>
Co-authored-by: markkaylor <[email protected]>
Copy file name to clipboardExpand all lines: docs/developer-docs/latest/developer-resources/plugin-api-reference/admin-panel.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@ Within the register function, a plugin can:
49
49
*[create a new settings section](#createsettingsection)
50
50
* define [injection zones](#injection-zones-api)
51
51
*[add reducers](#reducers-api)
52
+
* register the admin panel part of [custom fields](/developer-docs/latest/development/custom-fields.md#registering-a-custom-field-in-the-admin-panel)
52
53
53
54
#### registerPlugin()
54
55
@@ -180,6 +181,7 @@ The Admin Panel API allows a plugin to take advantage of several small APIs to p
180
181
| Declare an injection zone |[Injection Zones API](#injection-zones-api)|[`registerPlugin()`](#registerplugin)|[`register()`](#register)|
181
182
| Add a reducer |[Reducers API](#reducers-api)|[`addReducers()`](#reducers-api)|[`register()`](#register)|
182
183
| Create a hook |[Hooks API](#hooks-api)|[`createHook()`](#hooks-api)|[`register()`](#register)|
184
+
| Register the admin panel part of a custom field | APIs for custom fields (see [custom fields documentation](/developer-docs/latest/development/custom-fields.md)) |`app.customFields.register()`|`register()`|
183
185
| Add a single link to a settings section |[Settings API](#settings-api)|[`addSettingsLink()`](#addsettingslink)|[`bootstrap()`](#bootstrap)|
184
186
| Add multiple links to a settings section |[Settings API](#settings-api)|[`addSettingsLinks()`](#addsettingslinks)|[`bootstrap()`](#bootstrap)|
185
187
| Inject a Component in an injection zone |[Injection Zones API](#injection-zones-api)|[`injectComponent()`](#injection-zones-api)|[`bootstrap()`](#register)|
Copy file name to clipboardExpand all lines: docs/developer-docs/latest/developer-resources/plugin-api-reference/server.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ To tap into the Server API, create a `strapi-server.js` file at the root of the
28
28
29
29
### register()
30
30
31
-
This function is called to load the plugin, even before the application is actually [bootstrapped](#bootstrap), in order to register [permissions](/developer-docs/latest/plugins/users-permissions.md) or database migrations.
31
+
This function is called to load the plugin, before the application is [bootstrapped](#bootstrap), in order to register [permissions](/developer-docs/latest/plugins/users-permissions.md), the server part of [custom fields](/developer-docs/latest/development/custom-fields.md#registering-a-custom-field-on-the-server), or database migrations.
-`media`, for files uploaded through the [Media library](/user-docs/latest/content-types-builder/configuring-fields-content-type.md#media)
107
+
-`media` for files uploaded through the [Media library](/user-docs/latest/content-types-builder/configuring-fields-content-type.md#media)
108
108
-`relation` to describe a [relation](#relations) between content-types
109
+
-`customField` to describe [custom fields](#custom-fields) and their specific keys
109
110
-`component` to define a [component](#components-2) (i.e. a data structure usable in multiple content-types)
110
111
-`dynamiczone` to define a [dynamic zone](#dynamic-zones) (i.e. a flexible space based on a list of components)
111
112
- and the `locale` and `localizations` types, only used by the [Internationalization (i18n) plugin](/developer-docs/latest/plugins/i18n.md)
@@ -118,7 +119,7 @@ The `type` parameter of an attribute should be one of the following values:
118
119
| Date types | <ul><li>`date`</li> <li>`time`</li> <li>`datetime`</li> <li>`timestamp`</li></ul> |
119
120
| Number types | <ul><li>`integer`</li><li>`biginteger`</li><li>`float`</li> <li>`decimal`</li></ul> |
120
121
| Other generic types |<ul><li>`boolean`</li><li>`array`</li><li>`json`</li></ul> |
121
-
| Special types unique to Strapi |<ul><li>`media`</li><li>[`relation`<Fa-Linkcolor="grey"size="1x"/>](#relations)</li><li>[`component`<Fa-Linkcolor="grey"size="1x"/>](#components)</li><li>[`dynamiczone`<Fa-Linkcolor="grey"size="1x"/>](#dynamic-zones)</li></ul> |
122
+
| Special types unique to Strapi |<ul><li>`media`</li><li>[`relation`<Fa-Linkcolor="grey"size="1x"/>](#relations)</li><li>[`customField`<Fa-Linkcolor="grey"size="1x"/>](#custom-fields)</li><li>[`component`<Fa-Linkcolor="grey"size="1x"/>](#components)</li><li>[`dynamiczone`<Fa-Linkcolor="grey"size="1x"/>](#dynamic-zones)</li></ul> |
122
123
| Internationalization (i18n)-related types<br /><br />_Can only be used if the [i18n plugin](/developer-docs/latest/plugins/i18n.md) is installed_|<ul><li>`locale`</li><li>`localizations`</li></ul> |
123
124
124
125
#### Validations
@@ -494,6 +495,35 @@ The `tableName` key defines the name of the join table. It has to be specified o
494
495
495
496
:::::
496
497
498
+
#### Custom fields
499
+
500
+
[Custom fields](/developer-docs/latest/development/custom-field.md) extend Strapi’s capabilities by adding new types of fields to content-types. Custom fields are explicitly defined in the [attributes](#model-attributes) of a model with `type: customField`.
501
+
Custom fields' attributes also accept:
502
+
503
+
Custom fields' attributes also show the following specificities:
504
+
- a `customField` attribute whose value acts as a unique identifier to indicate which registered custom field should be used. Its value follows:
505
+
- either the `plugin::plugin-name.field-name` format if a plugin created the custom field
506
+
- or the `global::field-name` format for a custom field specific to the current Strapi application
507
+
- and additional parameters depending on what has been defined when registering the custom field (see [custom fields documentation](/developer-docs/latest/development/custom-fields.md)).
"attributeName": { // attributeName would be replaced by the actual attribute name
516
+
"type": "customField",
517
+
"customField": "plugin::color-picker.color",
518
+
"options": {
519
+
"format": "hex"
520
+
}
521
+
}
522
+
}
523
+
// …
524
+
}
525
+
```
526
+
497
527
#### Components
498
528
499
529
Component fields create a relation between a content-type and a component structure. Components are explicitly defined in the [attributes](#model-attributes) of a model with `type: 'component'` and accept the following additional parameters:
0 commit comments