Loading...
Syntax Highlighter 2018-04-05T14:06:49+00:00

Syntax Highlighter

The Syntax Highlighter Element is our solution that allows you to provide code snippets in a variety of different languages in a copiable, embeddable format directly on your website. Aside from the 4 pre-set style options, it comes with several customization options to control all colours, borders, text, line wrapping, code copying and more.

Copy to Clipboard

Premade Syntax Highlighting Styles

The syntax highlighting element comes with four pre-set visual styles to choose from to suit most if not all websites “look and feel”. There are two light themes and two dark themes to choose from.

Copy to Clipboard
Copy to Clipboard
Copy to Clipboard
Copy to Clipboard

Select Your Code Language

Do you want a bit more control over your highlighted syntax on your website? The syntax highlighting element lets you select the code language you are using.

Code Line Control Options

Choose if your code shows line numbers next to it or not, and with our Line Wrapping option you can choose if lines of code continue with a horizontal scroll bar or break into a new line so no scrolling is needed.

With Line Numbers

Copy to Clipboard

Without Line Numbers

Copy to Clipboard

With Horizontal Scroll

Copy to Clipboard

Without Horizontal Scroll

Copy to Clipboard

Copy to Clipboard Option For Easy Code Sharing

Do you want to share your code with your visitor? The Syntax Highlighter “Copy to Clipboard” option makes it so easy! Share an add banner, call to action, widget or other code with your visitors to embed on their own website! This option sits neatly in the top right corner of the box and with just a click it will copy the entire block of code. You can even customize what it says or disable this option entirely.

Copy to Clipboard

Custom Styling

We offer several customization options that allow you to control exactly how your code & block look. You can control the overall font size of the code, the border size, color and style of the entire box, the background color of the box, overall margins and even the line number text and background color. Make it yours!

Example 1

Copy to Clipboard

Example 2

Copy to Clipboard

Example 3

Copy to Clipboard

Mobile Visibility Settings

Our mobile visibility system gives you full control over what displays based on 3 customizable screen sizes. Every Fusion Builder Element has these settings and they allow you to show or hide elements on various screen sizes. In addition, you can choose what those screen sizes are! This gives you maximum control to set the exact point when an element should show or hide. Resize the page to see the elements appear or disappear based on what we set.

Only Show on Desktop

Only Show on Tablet

Only Show on Mobile

Complete Set of Options

Every option and description included with the Syntax Highlighter element is listed below.

  • theme – The theme you want the syntax highlighter to use. For example, Light 1.

  • language – The code language you are displaying within the syntax highlighter. For example, css or html

  • line_numbers – Turn line numbers on or off. For example, line_numbers=”1″ – Displays line numbers

  • line_wrapping – Choose whether you want lines to scroll horizontally across the syntax highlighter or break to a new line. Choose between “scroll” and “break”

  • copy_to_clipboard – Choose whether you want to show a “Copy to Clipboard” link on the syntax highlighter. For example, copy_to_clipboard=”1″ will turn it on

  • copy_to_clipboard_text – Choose what you want to display as the prompt text for the Copy to Clipboard function. For example, copy_to_clipboard_text=”Copy Now!” will display “Copy Now!” instead of “Copy to Clipboard”.

  • hide_on_mobile – Choose to show or hide the element on small, medium or large screens. Show them on all, or just some, giving you full control over all screen sizes. Each screen size also has a custom width setting in Fusion Theme Options.

  • class – Add a custom class to the wrapping HTML element for further css customization. Please refer to this documentation section.

  • id – Add a custom id to the wrapping HTML element for further css customization. Please refer to this documentation section.

  • font_size – Used to set the size of the font within the syntax highlighter. For example, font_size=”14″ will show the font at 14px

  • border_size – Set the size of the border for the syntax highlighter in pixels (px)

  • border_color – Set the colour of the border you’d like for the syntax highlighter element

  • border_style – There are several styles of border to choose from. These are; “solid”, “dashed” and “dotted”

  • background_color – Accepts a hexcode ( #000000 ). Sets the infobox’s background color. Leave Blank for Theme Option selection.

  • line_number_background_color – Set the background colour of the line numbers. Accepts a hexcode ( #000000 )

  • line_number_text_color – Sets the text colour for the line numbers. Accepts a hexcode ( #000000 )

  • margin_top – Sets the top margin for the syntax highlighter element.

  • margin_left – Sets the left margin for the syntax highlighter element.

  • margin_bottom – Sets the bottom margin for the syntax highlighter element.

  • margin_right – Sets the right margin for the syntax highlighter element.

Join The 425,000+ Satisfied Avada Users!

BUY AVADA NOW!

Sliding Bar Section For Widgets

This is the sliding section that can be enabled or disabled on any demo. You can insert anywhere from 1-6 columns along with any widget that comes with Avada, WordPress or additional 3rd party plugins. It's perfect for placing additional information on your site.

Recent Works

Contact Info

12345 North Street, New York City, NY 555555

Phone: 1-800-555-5555

Mobile: 1-234-567-8910

Fax: 1-234-879-5641

Web: http://yourwebsite.com