A magnifying glass held over a trail of footprints, one print enlarged under the lens
Trusted third parties1 min read

Embed Prism code highlighting on my site

Prism colours code samples on your page the way a code editor does, so a tutorial or a developer guide is readable rather than a grey wall. Nothing runs; it only adds colour.

The prompt

Colour the code samples on the API guide page with Prism, using the dark theme.

Signed in, Get my prompt fills in your site for you. Otherwise press Copy and fill in the [bracketed] parts. First time? Connect your AI to bernard once: Use your own AI (opens in a new tab).

Ask your AI

Colour the code samples on the API guide page with Prism, using the dark theme.

What bernard checks

Prism code highlighting is on bernard’s permitted list. Someone read the maker’s own instructions (https://prismjs.com) on 2026-09-14 and decided it was safe to run on a customer’s site: The root bundle highlights every matching block on load with no init call. Language packs are listed one by one in files; a pattern-matched files field is owed before the long tail of languages is usable (PRD 191 §10). Your site loads it from its published package, version 1.29.0 or newer. Every night bernard checks which version each of your pages loads against the published list of known weaknesses, and moves a page forward when one is found.

Your AI writes the exact tag bernard permits, on a private preview. You look at it and approve it before anything goes live.

People search for this as: code, syntax highlighting, prism, code block, tutorial, developer docs.

For the full list of libraries, what is waiting, and how to ask for one that is not there, see Embed a calendar, a diagram, a chart or another tool on my site.

Questions people ask

Do I need to write any code to use Prism code highlighting?
No. Your AI writes the exact tag bernard permits and puts it on a preview. You approve it before it goes live, and pasted code is removed for safety every time.
Is Prism code highlighting safe on my site?
bernard admits it only from its own published address, with its settings written as plain data rather than code. Every night bernard checks which version each of your pages loads against the published list of known weaknesses, and moves a page forward when one is found. Nothing else about it can be changed from a page.
Can I change it later?
Yes. Say what you want different and your AI redoes it on a preview for you to approve. Nothing about it is baked in.

Next