๐Ÿ’ป Code Snippet

Updated a few days ago

โ€ข

1 min read

Perfect Wiki enables you to add a code block to any of your documents.

To insert the code:

  1. Move your cursor to an empty line inside the item in which you'd like to add a code block.
  2. Click the โ€˜+โ€™ button โ†’ โ€œInsert Code Blockโ€ button on editor bar.
  3. A code block will appear, you can type or paste code in there

In Perfect Wiki editor you can choose the programming language you prefer from multiple options:

  • Bash
  • C
  • C#
  • C++
  • CSS
  • Diff
  • Docker
  • HTML
  • Java
  • Java Script
  • Markdown
  • PHP
  • Python
  • Ruby
  • SQL
  • TypeScript
  • VBScript
  • PowerShell
  • XML
  • Plain text

For example: Adding a code snippet using C++

In read-only mode your code is also highlighted to ease the navigation and the copy button to ease your workflow.

console.log("Hello world") 

 

To leave the code adding mode, hit โ€˜Enterโ€™ button 3 times. 

Was this page helpful?