# Inserting SmartText

## Inserting SmartText in Simple text fields&#x20;

Site Builder sections that contain simple input settings for your text requires just a simple addition of SmartText in either an insert, replace or variant mode.&#x20;

For example, in the image below we show a settings group where Headings and Subheading is considered a simple text setting

![](/files/t8g2hwvco5du1lqziD7n)

### How to insert SmartText in simple text settings

* [ ] Copy this text: `<smart text="Hey there {{first_name}}, "/>` to your clipboard
* [ ] Paste it into a simple text section on one of your site pages using Site Builder
* [ ] Replace the text inside the quote with the static text you would like to use as well as any SmartText Attributes you would like to use.If you need to include a quote in your text, than use a single quote instead.
* [ ] Save your page

```
<smart text="Hey there {{first_name}}, "/>Join Our Free Workshop

User signed in => Hey there Sammie, Join Our Free Workshop
Not signed in (?first_name=Samantha) => Hey there Samamtha, Join Our Free Workshop
Not signed in (no query param) => Join Our Free Workshop
```

## Using SmartText in Rich text fields (Site Builder and Text Lessons)&#x20;

Site Builder sections may have what is called a "Rich Text" editor. This is when you see a toolbar of icons that allows you to control the styling of the content (as shown below). Inserting SmartText using the rich text editor is handled a bit differently. It is recommended that you watch the demo video below.

![](/files/1OcPnrwroby0AAwjLybH)

### How to use SmartText in the rich text editor

* [ ] Click the code icon in the tool bar \</> this will show you the html code that will be used
* [ ] Locate the position that you would like the SmartText to be inserted
* [ ] Copy this text `<span class="smarttext" data-text="Hey there {{first_name}}, ">.</span>` to your clipboard
* [ ] Change the text and SmartText Attributes that are inside the quotes for the data-text section. Be sure to maintain the rest of the text including the quotes. If you need to include a quote in your text, then use a single quote instead.
* [ ] Click the code icon in the tool bar again \</> to return to the preview. Note: you will not see the SmartText be reflected in the Text Editor preview, but should see it previewed on the page.
* [ ] Save your page (or course curriculum settings if working in a text lesson)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-smarttext.superpowerups.com/site-page-personalization/smarttags/inserting-smarttext.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
