# Code highlight and HTML insertion

**URL:** <https://forum.ghost.org/t/code-highlight-and-html-insertion/13944>\
**Category:** Developer help\
**Created:** [April 29, 2020, 3:44pm UTC](https://forum.ghost.org/t/code-highlight-and-html-insertion/13944 "2020-04-29T15:44:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![muZk](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/muzk/32/6757_2.png) [@muZk](https://forum.ghost.org/u/muZk)\
**Post date:** [April 29, 2020, 3:44pm UTC](https://forum.ghost.org/t/code-highlight-and-html-insertion/13944/1 "2020-04-29T15:44:41Z")

</div>

Hello, I’m trying to use prism code highlight with Ghost(pro).

I tried by using [this solution](https://forum.ghost.org/t/use-line-highlight-prismjs-plugin-in-ghost/12338) (inserting your code block with HTML) which works (it does highlight) but with two problems.

**First problem:**

 ![ezgif-5-19e0a79dd1d4](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/d/dbc250b1d7fd3a0fa1e488712c7b02a64db9e249.gif)

The HTML code inside ` block is not rendered as text.`

`
Second problem:
Generated code starts at line 2, not line 1

Is there another way do accomplish line highlight in Ghost? 😰`

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [April 29, 2020, 3:48pm UTC](https://forum.ghost.org/t/code-highlight-and-html-insertion/13944/2 "2020-04-29T15:48:25Z")

</div>

@muZk that other solution is quite out of date. If you type ````` and press Enter (the rich-text editor supports most of markdown ;-) ) then you’ll get a code card where you can paste code and choose a language.

For the highlighting part you’ll still need to adjust your theme to have highlighting.

[https://ghost.org/tutorials/code-syntax-highlighting/](https://ghost.org/tutorials/code-syntax-highlighting/)

---

<div class="post-metadata">

**Author:** ![gregpozo](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/gregpozo/32/3395_2.png) [@gregpozo](https://forum.ghost.org/u/gregpozo)\
**Post date:** [April 29, 2020, 4:31pm UTC](https://forum.ghost.org/t/code-highlight-and-html-insertion/13944/3 "2020-04-29T16:31:55Z")

</div>

Your concern about the count is valid. I updated the post to show you how to fix this.

Basically, you will have to “sandwich” HTML blocks to accomplish the feature. Same code, just different way to implement it.

Let me know if it helps!
