Thkee now supports syntax highlighting for code blocks and inline code within the Questions, Answers, Quizzes, and Articles.
How to Add Inline Code
Inline codes are very useful when you want to highlight a short snippet of code. For example, the definition of a function or the name of a variable inside a paragraph.
To add Inline Code, please follow the steps below:
-
Navigate to the question or answer box where you want to add your code. Make sure to type your question first if you want to attach your code to a question.
-
Then click, Ask a new question.
-
Fill in the prompt box what you want to say.
-
Highlight the portion that you want to change to inline code.
-
Click on the inline code icon in the tool bar.
-
Click either Post Question or Add an answer.
#It is better if we could also add a photo here so the user can understand it better
How to Add Code Blocks
Code blocks are very useful when you want to highlight multiple lines of code.
To add Code Blocks, please follow the steps below:
-
Navigate to the question or answer box where you want to enter your code block. Make sure to type your question first if you want to attach your code to a question.
-
Enter the code block you wish to include and highlight it.
-
Click on the inline code icon in the tool bar.
-
Then, click either Post Question or Add an answer.
-
Your inline code should be nicely highlighted!
@abdelbasset zitouni (Unlicensed) Please, add a Pic. https://eng-ibrahim.atlassian.net/browse/HC-258 #to add photo
Where to Use Code Blocks and Inline Code
@abdelbasset zitouni (Unlicensed) Please, add a Pic. #to add photo #i need reference pic for the photo
- Questions & Answers: you can highlight your code inside questions and answers. This makes it easier and faster for students to read it and share their feedback.
- Quizzes: you can highlight your code in the questions of a quiz and in the answers. This allows the instructors to ask questions such as “Which is the correct way to solve this problem?” and prompt students to choose the correct answer from a set of different implementations.
- Articles: you can highlight your code in articles, so that students can easily read and learn from it.