> [!note] Code Blocks
> **Code Blocks** allow you to dynamically generate content and create templates quickly. They act as on-page templates that you can run with the push of a button.
> Syntax used inside is exactly the same as normal [[00 Introduction To Templates]].
>
>
[](https://user-images.githubusercontent.com/9850722/206441970-7b667f13-148e-4ac4-aa88-5d25d7bca003.png)
## Creating Text Generator Code Blocks
- First, create a normal code block with `tg` as the language code.
- Next, write your desired commands inside the code block.
`````
```tg
Your commands here.
```
`````
## Using Text Generator Code Blocks
- You can use any of [[01 Understanding Context|Context available for templates]], the code block will display it.
- Click the **Create a new Template** button to convert the code block into a full-fledged Template.
- Click the **Generate Text** button to run the code block through Text Generator. Generated text will be added at your cursor location.
[](https://user-images.githubusercontent.com/9850722/206294153-dedaa1c3-db2c-46f2-ae03-644bde78d205.png)
[](https://user-images.githubusercontent.com/9850722/206295633-2e74fcf1-eaa3-41f1-97de-780765e78f0c.png)