# Template:SwitchPreview2

## Usage

```{{SwitchPreview2|ShowMessage=Click to expand|HideMessage=Click to hide|PreviewText=Hello, you are not viewing the totally expanded version|FullText=Hello, you are now viewing the expanded version.|NumChars=50}}
```

This produces:

Hello, you are not viewing the totally expanded ver [...]

Hello, you are now viewing the expanded version.

This may be the only real way to deal with Math in the preview, since math is rendered before extensions can do anything with them. Thus if you would like to include math:

```{{SwitchPreview2|ShowMessage=Click to expand|HideMessage=Click to hide|PreviewText=Hi there, this is a sample [itex]{\color{Gray}a^2+b^2 = c^2}[/itex] equation. I might follow it with a proof. Maybe.|FullText=Hi there, this is a sample [itex]{a^2+b^2 = c^2}[/itex] equation. I might follow it with a proof. Maybe.|NumChars=75}}
```

Hi there, this is a sample ${\color{Gray}a^2+b^2 = c^2}$ equation. I migh [...]

Hi there, this is a sample ${a^2+b^2 = c^2}$ equation. I might follow it with a proof. Maybe.