Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Code snippets on Dev portal

Not applicable

Hi All,

This question is not related to APIGEE but reaching out to community as we have lot of drupal experts here 🙂

I want to add some code snippets on a page on developer portal. The code snippet should have an option to select the language ,copy, download the code and expand the box sth like shown below:

4109-capture.png

I found a GeSHi module in drupal but it does not give all the functionality I wanted.

Please suggest.

1 2 386
2 REPLIES 2

@Vipul Agarwal ,

  • For, Select the language tabs
    • Use Drupal Quick Tabs module
    • Or, Use a custom javascript to render content in tabs
  • For, Syntax Highlighting
    • Use syntax highlighter module which does on client side, whereas geshi does on server side.
    • For copy feature use, https://clipboardjs.com/
    • You can use some custom javascript on client side to download code as a file.

thumbsup on the clipboardjs library. Works great.

Top Solution Authors