cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert source code

Lina_DABASINSKAITE
Community manager
Community manager

While writing content, you can add code samples to your posts. It is important to do it as explained below to increase the readability of your content.

1. Click the “Insert/Edit” code sample button in the content editor toolbar:

Code_1.PNG

2. Select the appropriate language from the dropdown menu:

Code_2.PNG

3. Paste the sample code and click OK.

Code_3.PNG

Related articles:
How to post
Getting faster and better answers in the community
How to write your question to maximize your chances to find a solution

Comments

To post text where the layout matters, but which is not source code - eg, console output, tabular text, ASCII art - see:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/725146/highlight/true#M54

 

Version history
Last update:
‎2024-12-11 05:07 AM
Updated by:
Contributors