
The code-block package(fifthtry.github.io/code-block). Use inside FTD
files for your web pages.
-- fastn.dependency: fifthtry.github.io/code-block
-- fastn.auto-import: fifthtry.github.io/code-block as cb
cb.code Basic usage example-- cb.code:-- cb.code: Title for the code block
lang: ftd
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
download:-- cb.code: Title for the code block
lang: ftd
copy: true
download: sample.ftd
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
copy (by default true)-- cb.code: Title for the code block
lang: ftd
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
copy false without title:-- cb.code:
lang: ftd
copy: false
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
copy false with title:-- cb.code: Some title
lang: ftd
copy: false
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
copy true without title:-- cb.code:
lang: ftd
copy: true
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
download attribute without title:-- cb.code:
lang: ftd
copy: false
download: sample.ftd
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
download attribute and copy true without title:-- cb.code:
lang: ftd
copy: true
download: sample.ftd
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
rendered componentWe have introduced rendered component, which you can use to show rendered
output of your code including it in rendered.input as body of rendered
component.
In below example though we added copy: true attribute, but its true by
default. So, no need to add this attribute while using rendered component.
download: <file-name> attribute is optional. Add it only where required.
-- rendered:
copy: true
download: sample.ftd
-- rendered.input:
-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- rendered.output:
-- ftd.text: Some title - rendered
role: $inherited.types.copy-regular
color: $inherited.colors.text
-- end: rendered.output
-- end: rendered
rendered component:-- ftd.text: Some title
role: $inherited.types.copy-regular
color: $inherited.colors.text
