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: 15/umbraco-cms/reference/umbraco-flavored-markdown.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,39 @@ export { MyCustomUfmComponentApi as api };
142
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.
143
143
144
144
145
+
### Custom UFM filters
146
+
147
+
If you wish to develop your own custom UFM filter, you can use the `ufmFilter` extension type:
148
+
149
+
```json
150
+
{
151
+
type: 'ufmFilter',
152
+
alias: 'My.UfmFilter.Reverse',
153
+
name: 'Reverse UFM Filter',
154
+
api: () => import('./reverse.filter.js'),
155
+
meta: {
156
+
alias: 'reverse'
157
+
}
158
+
}
159
+
```
160
+
161
+
The corresponding JavaScript/TypeScript API would contain a function to transform the value.
Using the syntax `{umbValue: headline | reverse}`, e.g. where `headline` having a value of `Hello world` would be transform to `dlrow olleH`.
176
+
177
+
145
178
## Post-processing and sanitization
146
179
147
180
When the markdown has been converted to HTML, the markup will be run through post-processing sanitization to ensure security and consistency within the backoffice.
0 commit comments