Skip to content

Commit b313ef3

Browse files
Fix linting
1 parent c957a4a commit b313ef3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,21 @@ ng serve my-ssr-app --open
215215
```
216216

217217
### Highcharts AST
218+
218219
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.
219220

220-
```
221+
```ts
221222
provideHighcharts({
222223
instance: () =>
223224
import('highcharts/esm/highcharts').then((m) => {
224225
const Highcharts = m.default;
225226

227+
// Allow custom attributes
226228
Highcharts.AST.allowedAttributes.push('custom-attribute');
229+
230+
// Allow custom elements
231+
Highcharts.AST.allowedTags.push('my-custom-tag');
232+
227233
return Highcharts;
228234
}),
229235
}),

0 commit comments

Comments
 (0)