Skip to content

Commit 23a118c

Browse files
committed
Code snippet amends
1 parent a440004 commit 23a118c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

15/umbraco-cms/reference/umbraco-flavored-markdown.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,16 @@ If you wish to develop your own custom UFM component, you can use the `ufmCompon
121121
name: 'My Custom UFM Component',
122122
api: () => import('./components/my-custom.component.js'),
123123
meta: {
124-
alias: 'myCustom',
125-
},
124+
alias: 'myCustom'
125+
}
126126
}
127127
```
128128

129129
The corresponding JavaScript/TypeScript API would contain a method to render the custom label/markup.
130130

131131
```js
132+
import { UmbUfmComponentBase } from '@umbraco-cms/backoffice/ufm';
133+
132134
export class MyCustomUfmComponentApi implements UmbUfmComponentBase {
133135
render(token: Tokens.Generic) {
134136
// You could do further regular expression/text processing here!
@@ -139,7 +141,7 @@ export class MyCustomUfmComponentApi implements UmbUfmComponentBase {
139141
export { MyCustomUfmComponentApi as api };
140142
```
141143

142-
Using the syntax `{myCustom: myCustomText}` would render the markup `<ufm-custom-component text="myCustomText">`. Then inside the `ufm-custom-component` component code, you can perform any logic to render your required markup.
144+
Using the syntax `{myCustom: myCustomText}` would render the markup `<ufm-custom-component text="myCustomText"></ufm-custom-component>`. Then inside the `ufm-custom-component` component code, you can perform any logic to render your required markup.
143145

144146

145147
### Custom UFM filters

0 commit comments

Comments
 (0)