Skip to content

Commit c957a4a

Browse files
Describe how to use AST.
1 parent 63f4362 commit c957a4a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,21 @@ Our showcase application includes an example of SSR integration. You can try it
214214
ng serve my-ssr-app --open
215215
```
216216

217+
### Highcharts AST
218+
Highcharts sanitizes HTML/SVG content with its internal AST (Abstract Syntax Tree) parser. By default, only a safe list of attributes and tags is allowed. If you need to support custom attributes or elements (for example, to render extra data attributes), you must extend the AST configuration before Highcharts is initialized.
219+
220+
```
221+
provideHighcharts({
222+
instance: () =>
223+
import('highcharts/esm/highcharts').then((m) => {
224+
const Highcharts = m.default;
225+
226+
Highcharts.AST.allowedAttributes.push('custom-attribute');
227+
return Highcharts;
228+
}),
229+
}),
230+
```
231+
217232
### Angular Elements and useHTML
218233

219234
First, install angular elements:

0 commit comments

Comments
 (0)