How to display source code block?

Here is my use case, I have a code snippet that I would like a customer to be able to copy and paste for use in their website.

Is there a recommendation on how to have this code display on a page, I also would like to include a button or easy way for the customer to copy the code to the clipboard.

Here are two examples: https://stripe.com/docs/billing/subscriptions/checkout/fixed-price
(more fancy than what I need, I don’t need the customer to select the language)

Is there something like codemirror or a way of configuring a textarea or paragraph to display code?
https://codemirror.net/index.html

One more example…https://prismjs.com/

Thanks! Ed.

Community Page
Last updated: