Skip to main content

HTML in cells

If you are using the ES module, import the html function first:

import { Grid, html } from "gridjs";

or use gridjs.html(...) if you are using the UMD export.

Then you can use that in formatter function or directly in data array:

Live Editor
Result
Loading...

note

Using the html function can expose your application to XSS attacks. Make sure you understand the implications of using this function and always sanitize the user inputs before passing them to the html function.

Live Editor
Result
Loading...