HTML in cells

Import the html function first:

import { Grid, html } from "gridjs";

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

Live Editor
Result

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
Last updated on by Afshin Mehrabani