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
Copy file name to clipboardExpand all lines: website/content/docs/beta-features.md
-86
Original file line number
Diff line number
Diff line change
@@ -9,35 +9,6 @@ We run new functionality in an open beta format from time to time. That means th
9
9
10
10
11
11
12
-
13
-
14
-
15
-
## Custom Mount Element
16
-
17
-
Decap CMS always creates its own DOM element for mounting the application, which means it always takes over the entire page, and is generally inflexible if you're trying to do something creative, like injecting it into a shared context.
18
-
19
-
You can now provide your own element for Decap CMS to mount in by setting the target element's ID as `nc-root`. If Decap CMS finds an element with this ID during initialization, it will mount within that element instead of creating its own.
20
-
21
-
22
-
23
-
24
-
25
-
## Image widget file size limit
26
-
27
-
You can set a limit to as what the maximum file size of a file is that users can upload directly into a image field.
28
-
29
-
Example config:
30
-
31
-
```yaml
32
-
- label: 'Featured Image'
33
-
name: 'thumbnail'
34
-
widget: 'image'
35
-
default: '/uploads/chocolate-dogecoin.jpg'
36
-
media_library:
37
-
config:
38
-
max_file_size: 512000# in bytes, only for default media library
39
-
```
40
-
41
12
## Summary string template transformations
42
13
43
14
You can apply transformations on fields in a summary string template using filter notation syntax.
@@ -59,64 +30,7 @@ collections:
59
30
The above config will transform the title field to uppercase and format the date field using `YYYY-MM-DD` format.
60
31
Available transformations are `upper`, `lower`, `date('<format>')`, `default('defaultValue')`, `ternary('valueForTrue','valueForFalse')` and `truncate(<number>)`/`truncate(<number>, '<string>')`
61
32
62
-
## Registering to CMS Events
63
-
64
-
You can execute a function when a specific CMS event occurs.
Supported events are `prePublish`, `postPublish`, `preUnpublish`, `postUnpublish`, `preSave` and `postSave`. The `preSave` hook can be used to modify the entry data like so:
Decap CMS always creates its own DOM element for mounting the application, which means it always takes over the entire page, and is generally inflexible if you're trying to do something creative, like injecting it into a shared context.
8
+
9
+
You can now provide your own element for Decap CMS to mount in by setting the target element's ID as `id="nc-root"`. If Decap CMS finds an element with this ID during initialization, it will mount within that element instead of creating its own.
10
+
11
+
This is useful if you want to create a wrapper around the CMS, like a custom header, footer, or sidebar.
12
+
13
+
**Example**
14
+
15
+
Adding the following div to `admin/index.html` will cause the CMS to load within it:
Supported events are `prePublish`, `postPublish`, `preUnpublish`, `postUnpublish`, `preSave` and `postSave`. The `preSave` hook can be used to modify the entry data like so:
0 commit comments