Search
Search
Add/modify shortcodes
Available for CloudCannon, Decap CMS, Netlify CMS and Sveltia CMS
/config/_default/params.yaml
All shortcodes are available by default but if you want hide or add your shortcodes, you can do it:
params:
admin:
shortcodes:
# Array of available shortcodes
enable:
- alert
- alert-block
- badge
- blank_link
- blockquote
- button
- dailymotion
- details
- figure
- icon
- map
- qr
- span_lang
- twitch
- twitter
- video
- vimeo
- youtube
The default list grew with alert-block, dailymotion, figure, icon, qr, span_lang, twitch, video and vimeo.
The icon shortcode joins the markdown editor for CloudCannon, Decap, Netlify and Sveltia CMS.
/config/_default/params.yaml
params:
admin:
shortcodes:
enable: false
A shortcode’s fields are overridable the way a block’s are:
/config/_default/params.yaml
params:
admin:
shortcodes:
button:
fields:
- text
- url
# …
Add a js shortcode file in shortcodes directory.
layouts/
└── partials/
└── admin/
└── cms/
└── decapcms/
└── shortcodes/
And add it in enable shortcodes: see above