import ReactPlayer from 'react-player'
import checkbox_video from '../../../static/vid/checkbox.mov'
import list_item_video from '../../../static/vid/list_item.mov'
import h3_sample from '../../../static/vid/h3_sample.mov'

# Command Samples
Writeopia handles many text commands that create new content from what the user types. In this section you will learn the built-in commands.

## Checkbox
Typing the command  `-[] ` or `[] ` creates a checkbox in the place of current paragraph. The command must be done at the beginning of the line.

<ReactPlayer playing={false} controls url={checkbox_video} width="100%"/>

## List item
Typing the command  `- ` creates a list item in the place of current paragraph. The command must be done at the beginning of the line.

<ReactPlayer playing={false} controls url={list_item_video} width="100%"/>

## H1, H2, H3, H4
Writeopia also has commands to create H1, H2, H3 and H4.

| Command | Result  |
| ------- | ------- |
| `#`     | H1      |
| `##`    | H2      |
| `###`   | H3      |
| `####`  | H4      |

H3 sample:

<ReactPlayer playing={false} controls url={h3_sample} width="100%" />

<br/>

# Shortcuts

There are many shortcuts available to do actions in the text.

macOS:

| Command | Result  |
| ------- | ------- |
| CMD + k     | Ask AI      |
| CMD + a    | Selects all lines of text     |
| CMD + l   | Creatse a link to another page      |
| CMD + z  | Undo last action      |
| CMD + Shift + z  | Redo last action      |
| CMD + b  | Bold      |
| CMD + i  | Italic      |
| CMD + u  | Underline      |
| CMD + Shift + s | Saves file locally in your computer      |

Windows/Linux:

| Command | Result  |
| ------- | ------- |
| Ctrl + k     | Ask AI      |
| Ctrl + a    | Selects all lines of text     |
| Ctrl + l   | Creatse a link to another page      |
| Ctrl + z  | Undo last action      |
| Ctrl + Shift + z  | Redo last action      |
| Ctrl + b  | Bold      |
| Ctrl + i  | Italic      |
| Ctrl + u  | Underline      |
| Ctrl + Shift + s | Saves file locally in your computer      |
