How to add new button on X text editor

Hi,

Can I add Crayon Syntax Highlighter button to X text editor or Can I disable this code removing ? I want add this because when I insert a code it is removing codes, for example;

I want insert this code to my post with X code shortcode

<ifModule mod_headers.c>
    Header set Connection keep-alive
</ifModule>

It looks like that

Header set Connection keep-alive

Hi There,

Thank you for writing in, you can choose the Preformatted format from the text editor (https://prnt.sc/gzeodp)

Or use the Code Snippet element instead.

You can use the Crayon Syntax Highlighter using the <pre> tag (see their documentation)

Cheers,

When I use Code Snippet element it looks like on screenshot and when I use <pre> tag it looks like same type with Code Snippet element. Also I tried [crayon attributes] … [/crayon] but still didn’t work.

Just Preformatted method worked for me but I need crayon code snippet in your pro builder, help me please.

Hello There,

Simply use the Classic Code Snippet element and insert your code:

<ifModule mod_headers.c>
    Header set Connection keep-alive
</ifModule>

And this is the output:

If you want to apply Crayon, please use Raw content element instead and insert this code:

<pre class="lang:php theme:twilight mark:1,2-4" title="something">
<ifModule mod_headers.c>
    Header set Connection keep-alive
</ifModule>
</pre>

In Cornerstone, it will only look normal because Crayon is not supported inside Cornerstone.

But when you view the live page, you will see Crayon Syntax Highlighting:

Hope this helps.

1 Like

Thank you very much, it worked now.

You’re welcome!
We’re glad we were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.