expressive-code / expressive-code

A text marking & annotation engine for presenting source code on the web.

Home Page:https://expressive-code.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copy button without frame

geerew opened this issue · comments

This is less of an issue and more of a query.

Is it possible to have the copy button but disable frames? When I disable frames the copy button no longer appears ..

Thanks

Hello @geerew and welcome!

By default, frames are only displayed either when the code block has a title (= leads to a code editor frame being displayed), or when it uses a terminal language (= leads to a terminal window frame being displayed). I assume in your case that you're using a terminal language and don't want the terminal window style to appear?

If so, you can add the attribute frame="none" to the end of the opening code fence line like this:

```bash frame="none"
echo "This is not rendered as a terminal despite using the bash language"
```

This will get displayed like this, with a working copy button:
image

Does this solve your issue?

This is a perfect solution. Thank you