Widget Content Syntax
Appendix reference for the content formats used inside interactive widgets.
Every interactive widget in the Lex Editor has a content format that defines its data -- pairs, items, statements, or text. When you insert a widget through the toolbar or slash commands, the editor wraps this content automatically. You do not need to write the wrapper by hand -- but understanding the content format is useful for advanced users, AI prompt engineering, and troubleshooting.
Who this is for
Advanced users who need the exact content formats used inside widgets.
What this page answers
- what the editable content looks like inside each widget
- how inline widgets differ from standalone widgets
- which syntax details matter for troubleshooting or AI prompts
This page documents the user-editable content of each widget type. Settings like shuffle, visual style, grid size, and instruction text are configured through the widget's edit panel (toggle Edit mode with the eye icon in the toolbar). The "Editable" column in each settings table indicates which parameters can be changed directly in the editor.
Inline answer widgets show a teal outline when selected — either by clicking, dragging across them with the cursor, or using Cmd/Ctrl+A. This makes copy, cut, and delete operations easier to target inside long paragraphs.
In-text Widgets
In-text widgets sit within a line of text. Their syntax is written directly inline.
Fill-in-the-Blank (AnswerInput)
Format: ___(correct_answer) or ___(correct_answer)<<comment>>
The simplest inline widget. Place it anywhere in a sentence where you want a text input field.
Basic Usage
She ___(went) to the store yesterday.Multiple Accepted Answers
Separate alternatives with a pipe |:
She ___(went|visited) the museum.With Hint
Add a hint after the answer using the :: separator inside the parentheses:
She ___(went::to go) to the store.The hint (here, the base form to go) renders in bold teal next to the input as a persistent clue. Hints round-trip through the editor and Markdown export, so you can copy answers between lessons without losing them.
Older lessons written without :: still work — the hint is simply absent.
With Student-Facing Comment
Add an optional comment after the answer when you want to explain why the answer is correct:
She ___(went::past of go)<<Use the past simple after yesterday.>> to the store.The comment appears in the answer results panel after the student answers correctly or reaches the reveal limit. Teachers can also open the panel while editing and update the answer, hint, or comment without rewriting the sentence.
How It Is Detected
If the content inside ___() has no comma, it is recognized as an answer field (fill-in-the-blank). If it has commas, it becomes a dropdown answer.
Multiple Choice Dropdown (AnswerCombo)
Format: ___(correct, wrong1, wrong2, wrong3) or ___(correct, wrong1)<<comment>>
An inline dropdown where the student selects from options.
Basic Usage
Yesterday, I ___(went, go, going, gone) to the store.The first item is always the correct answer. Items after commas are distractors. The display order is shuffled automatically.
Multiple Correct Answers
Use a pipe | for alternatives:
___(went|visited, go, going) to the store.With Hint
___(went::to go, go, going, gone)The ::hint attaches to the correct answer and is displayed beside the dropdown after submission.
With Student-Facing Comment
___(went::to go, go, going, gone)<<Use the past simple for a finished action yesterday.>>Comments can be combined with hints and distractors. Students see the comment in the results panel after success or after the reveal limit. Teachers can hover or click the answer to keep the panel open, edit the correct answer, edit distractors, change the hint, change the comment, or reset attempts.
Automatic Distractor Deduplication
If a distractor accidentally repeats the correct answer or another distractor (a common slip in AI-generated drafts like ___(went, went, go)), the editor silently removes duplicates on save, insert, and paste. Comparisons are case-insensitive.
Teacher Results Panel
Fill-in-the-blank, dropdown, and inline choice answers use a shared results panel:
- Students see it only after the answer is revealed.
- Teachers can inspect answers while editing, then click the panel to keep it open.
- Edit lets teachers adjust the correct answer, dropdown distractors, hints, and comments.
- Reset clears attempts so the revised question starts fresh for collaborators.
- In exam lockdown, answer panels are hidden until the exam rules allow reveal.
Dismiss the panel by clicking outside it, pressing Escape, or saving/canceling an edit.
Inline Choice (AnswerChoose)
Format: [correct, wrong1, wrong2, wrong3]
An inline widget where all options are shown as clickable text. Unlike the dropdown, every option is visible at once — the student clicks to choose. Uses square brackets instead of ___().
Basic Usage
Yesterday, I [went, go, going, gone] to the store.The first item is always the correct answer. Items after commas are distractors. The display order is shuffled automatically. The widget renders inline as (went, go, going, gone) — click an option to select it.
Multiple Correct Answers
Use a pipe | for alternatives:
[went|visited, go, going] to the store.When to Use Instead of Dropdown
- When you want all options immediately visible (no click to open)
- When the options are short enough to fit inline
- For quick recognition exercises where seeing all choices at once aids learning
Standalone Widgets
Standalone widgets are inserted via slash commands or the Insert menu. Below is the content format for each -- what you edit inside the widget.
Matching Widget
A click-to-connect pairing exercise.
Content Format
Each line defines a pair with left :: right. Distractors use the !! prefix:
- apple :: яблоко
- cat :: кот
- house :: дом
- car :: машина
- !! мышкаThe !! item appears in the right column but has no matching left-side item.
Settings
| Parameter | Values | Default | Editable |
|---|---|---|---|
shuffle | true, false | true | Yes |
ui | classic, children | classic | Yes (theme toggle) |
instruction | any string | (none) | Yes |
Ordering Widget
A drag-and-drop sequencing exercise.
Content Format
Items are listed in the correct order. The editor shuffles them for the student. Use for both sentence ordering and word ordering:
1. First, preheat the oven.
2. Then, mix the ingredients.
3. Next, pour into the pan.
4. Finally, bake for 30 minutes.Settings
| Parameter | Values | Default | Editable |
|---|---|---|---|
instruction | any string | (none) | Yes |
ui | classic, children | classic | Yes (theme toggle) |
Items are always shuffled for the student.
Sentence Builder
Students drag word tiles to build a sentence.
Content Format
The first line is the target sentence. Each word becomes a tile in a shuffled word bank. Lines starting with !! add distractor words:
The cat sat on the mat
!! dog
!! underSettings
| Parameter | Values | Default | Editable |
|---|---|---|---|
instruction | any string | (none) | Yes |
hint | true, false | false | Yes |
ui | classic, children | classic | Yes (theme toggle) |
When hint is enabled, a hint button appears during gameplay that reveals one correct word in its correct position. Words are always shuffled.
True/False Widget
A series of statements to evaluate as true or false.
Content Format
[T] marks a true statement, [F] marks a false one. Text after // is the explanation shown after answering:
- [T] The Earth orbits the Sun. // It completes one orbit every 365.25 days.
- [F] The Moon is larger than the Earth. // The Moon's diameter is about 1/4 of Earth's.
- [T] Water boils at 100 degrees Celsius at sea level.Settings
| Parameter | Values | Default |
|---|---|---|
instruction | any string | (none) |
ui | classic, children | classic |
Choose Answers Widget
Students select all correct answers from a list of options (multi-select checkboxes).
Content Format
[+] marks a correct option, [-] marks an incorrect distractor:
[+] Apple
[+] Banana
[-] Car
[+] Cherry
[-] HouseSettings
| Parameter | Values | Default | Editable |
|---|---|---|---|
instruction | any string | (none) | Yes |
shuffle | true, false | true | Yes |
show_count | true, false | true | Yes |
ui | classic, children | classic | Yes (theme toggle) |
When show_count is enabled, the widget displays "Select N correct answers" as a hint. Students can select at most N options — selecting a new one when at the limit automatically deselects the oldest selection.
Category Sort Widget
Students drag items into the correct categories.
Content Format
Categories are defined with ## Category Name, items listed below each:
## Nouns
- apple
- house
- cat
## Verbs
- run
- eat
- sleepItems Valid in Multiple Categories
List the same item under more than one category when more than one answer should be accepted:
## Countable nouns
- cake
- chicken
- paper
## Uncountable nouns
- chicken
- paper
- waterStudents place each item once. If an item appears in multiple categories, any listed category is marked correct. Scoring counts unique items, not every repeated category membership.
Settings
| Parameter | Values | Default | Editable |
|---|---|---|---|
layout | horizontal, vertical | horizontal | Yes |
instruction | any string | (none) | Yes |
ui | classic, children | classic | Yes (theme toggle) |
Feedback is always shown on submit.
Flashcard Widget
Interactive flip cards for vocabulary review.
Content Format
Each line defines a card: front | back. Optional hint in parentheses:
- apple | яблоко
- cat | кот
- house | дом (hint: place where you live)Settings
| Parameter | Values | Default | Editable |
|---|---|---|---|
instruction | any string | (none) | Yes |
show_progress | true, false | true | Yes |
ui | classic, children | classic | Yes (theme toggle) |
Cards are always displayed in the defined order.
Memory Game Widget
A classic memory matching game where students flip cards to find pairs.
Content Format
Each line defines a pair with term :: match:
- apple :: яблоко
- cat :: кот
- house :: дом
- dog :: собака
- book :: книга
- tree :: деревоSettings
| Parameter | Values | Default | Editable |
|---|---|---|---|
grid | auto, 2x3, 2x4, 3x4, 4x4, 4x5 | auto | Yes |
instruction | any string | (none) | Yes |
time_limit | seconds | (none) | — |
show_timer | true, false | true | — |
ui | classic, children | classic | Yes (theme toggle) |
When a specific grid size is selected (not auto), the number of pairs must exactly match the grid capacity: 2x3 = 3 pairs, 2x4 = 4, 3x4 = 6, 4x4 = 8, 4x5 = 10. The editor validates this on save.
Word Scramble Widget
Students unscramble letters to spell the correct word.
Content Format
Each line: word (hint):
- apple (яблоко)
- beautiful (красивый)
- elephant (слон)Settings
| Parameter | Values | Default | Editable |
|---|---|---|---|
hint_type | translation, definition, first-letter, none | translation | Yes |
instruction | any string | (none) | Yes |
attempts | number (1-10) | 3 | Yes |
ui | classic, children | classic | Yes (theme toggle) |
Word Search Widget
Students find hidden words in a letter grid.
Content Format
Each line: word (optional clue):
- apple (яблоко)
- house (дом)
- cat (кот)Settings
| Parameter | Values | Default | Editable |
|---|---|---|---|
grid_size | number (6-15) | 10 | Yes |
directions | horizontal, vertical, diagonal (comma-separated) | horizontal,vertical | Yes |
instruction | any string | (none) | Yes |
show_word_list | true, false | true | Yes |
time_limit | seconds (0 = no limit) | 0 | Yes |
ui | classic, children | classic | Yes (theme toggle) |
When a time limit is set, a countdown is displayed instead of elapsed time. When time runs out, the puzzle is locked and a "Time's up!" screen shows how many words were found.
Crossword Widget
A classic crossword puzzle with clues.
Content Format
Each line: word : clue:
- apple : A red or green fruit
- cat : A small furry pet that purrs
- house : A building where people liveSettings
| Parameter | Values | Default | Editable |
|---|---|---|---|
hints_allowed | number (0-10) | 3 | Yes |
instruction | any string | (none) | Yes |
ui | classic, children | classic | Yes (theme toggle) |
Sentence Gap
A reading-coherence widget used in exam-style tasks where students drag missing sentence fragments into numbered gaps.
Content Format
The body has two parts separated by a line containing only ---.
:::sentenceGap(instruction="Complete the text with the missing fragments." distractors="1")
Remote work changed how many teams communicate. [1] Some people enjoy the flexibility. [2]
Other workers miss daily contact with colleagues. [3]
---
- Online meetings became part of everyday work.
- More companies now offer flexible schedules.
- This is why some offices use a hybrid model.
- Traditional offices are still common in banking.
:::The numbered markers [1], [2], and [3] are the gaps in the passage. The tray lines are written in answer order: the first tray line is correct for [1], the second for [2], and so on. Extra lines after the real answers are distractors. The widget shuffles the tray for students.
Settings
| Parameter | Values | Default | Editable |
|---|---|---|---|
instruction | any string | (none) | Yes |
distractors | number | 0 | Yes |
ui | classic, children | classic | Yes |
Substitute Sentence
An exam-style passage widget for "choose the correct form in brackets" tasks. It wraps a full passage so examples and inline choices stay together.
Content Format
:::substituteSentence(instruction="Choose the correct form.")
<span class="exam-example">(**correct**, wrong1, wrong2)<sup>PRZYKŁAD</sup></span>
The graded item appears in the sentence as [correct, wrong1, wrong2].
:::Inside the passage, square brackets create inline choices. The first option is the correct answer, followed by distractors. Exam presets usually generate this block for grammar tasks; teachers normally review it rather than writing it from scratch.
Note Block
A student-facing callout block. Exam presets use grey exam notes for solved examples, word banks, role cards, and formal instructions.
Content Format
<note type="exam" size="mid">
PRZYKŁAD
Example text or answer bank goes here.
</note>The editor also accepts style="exam" for generated exam content. Notes are visible to students. For teacher-only guidance, use an annotation block instead.
Settings:
| Attribute | Values | Default |
|---|---|---|
type or style | info, warning, question, exam, children, quote | info |
position | left, centered, right | left |
size | full, mid, small | full |
Other Standalone Formats
AI Image Placeholder
An image request that the teacher or system can turn into a generated image:
![image:realistic "A family having dinner in a bright kitchen, natural light, no text"]()Settings: image type realistic or meme; the prompt must be inside quotes and the final parentheses stay empty until an image is generated.
Audio Player
Transcript text (shown after listening):
Optional transcript text hereSettings: src (audio URL), title (display title), transcript (hidden, after-listen, always), theme (default, compact), plays (maximum play count for exam tasks), and noRewind (true for no rewind).
Speech Recorder
Reference text for the student to read aloud:
The quick brown fox jumps over the lazy dog.Settings: prompt (instruction text), maxDuration (seconds, default 60).
For exam speaking tasks, a speech recorder can be followed by automated assessment. The visible syntax is still :::speech(...); scoring is attached by the platform after the student's recording is submitted.
Pronunciation
Pronunciation drills use the course language automatically. Put one target per line inside the fence:
:::pronunciation(language="en" difficulty="normal")
target="Hello"
target="Good morning"
target="How are you?"
:::Settings:
| Parameter | Values | Default | Editable |
|---|---|---|---|
target lines | up to 10 slides; each target max 5 words / 60 chars | at least one target | Yes |
language | stored from the course language, such as en, pl, de, or fr | course language | No |
difficulty | easy, normal, strict | normal | Yes |
Single-slide lessons may still store target="..." on the opening fence. Multi-slide drills use one target line per slide.
Runtime attaches [ref:…], [attempt:…], [url:…], and [score:…] markers to the opening fence after the student records. These are backend-owned — never write them by hand.
Live Examiner
The live examiner widget is used for exam role-play conversations. The body is the role card shown to the student before they start the conversation.
:::live-examiner(task="b1-nawa-speaking-rola" maxDuration=180)
**Situation:** You want to book a table in a cafe for Saturday evening.
**Your role:** You are the customer calling the cafe.
**You should:**
- give the day, time, and number of people,
- ask for a table by the window,
- ask about a birthday cake.
:::Settings:
| Parameter | Values | Default | Editable |
|---|---|---|---|
task | b1-nawa-speaking-rola | b1-nawa-speaking-rola | Usually generated by the exam preset |
maxDuration | seconds | 180 | Usually generated by the exam preset |
Runtime may attach [recording:…] to reconnect a scoring attempt after refresh. Do not write that marker by hand.
Writing Exam Widget
The writing exam widget is different from the older open-ended Essay block. It is used for structured exam writing tasks with word ranges, text entry, optional handwriting upload, and automated rubric feedback.
:::writing(set_id="1")
- part(id="p1" subtype="announcement" min=25 max=50 allow_text=true allow_image=true max_images=3)
Write a short announcement for a language-school notice board.
- part(id="p2" subtype="email" min=160 max=175 allow_text=true allow_image=true max_images=3)
Write an email to a friend about how you are improving your health this year.
:::Settings:
| Parameter | Values | Default | Editable |
|---|---|---|---|
set_id | number or numeric string | 0 | Usually generated by the exam preset |
id | part id, such as p1 or p2 | required | Usually generated by the exam preset |
subtype | announcement, invitation, postcard, well-wish, essay, narrative, email, character-description, report | required | Yes |
min / max | target word range | required | Yes |
allow_text | true, false | true | Yes |
allow_image | true, false | true | Yes |
max_images | number | 3 | Yes |
Essay Block
Sentence starter text:
In today's world...Roulette Wheel
Items for the wheel sectors:
- Do 5 jumping jacks
- Name 3 animals
- Spell your name backwardsSettings: theme (physical, vocabulary, mindfulness, fun), ui (classic, children).
Drawing Board
Drawing prompt text:
Draw a cat using only circlesSettings: time_limit (seconds), ui (classic, children).
Would You Rather
Each line has two options separated by |:
Have a pet dinosaur | Have a pet dragon
Be invisible | Be able to flySettings: ui (classic, children).
Breathing Timer
No content -- configured entirely through settings.
Settings: duration (seconds), pattern (breathing rhythm, e.g., 4-4-4-4), ui (classic, children).
Annotation (Teacher-Only)
Teaching notes visible only to the teacher:
Remind students about the irregular verb patterns from last lesson.Exercise Container
Exercise content with answer fields and dropdown answers inside. The exercise block groups multiple questions with a shared title and scoring.
Table with Fill-in Cells
Standard tables can include ___() format inside cells:
| Form | "go" | "be" |
|------|------|------|
| Present | ___(go) | ___(am) |
| Past | ___(went) | ___(was) |Answer Notes Rule
The matching, ordering, sentence builder, true/false, choose answers, and category sort widgets already encode correct answers in their content format. If you need a teacher-only answer key or explanation summary after these widgets, wrap it in an annotation. For inline answer widgets, use <<comment>> only when the explanation should eventually be shown to students after the answer reveal.
Frequently Asked Questions
Do I need to write this syntax by hand?
No. The editor generates the correct format when you use the toolbar or slash commands. This reference is for advanced users, troubleshooting, and understanding how AI-generated content works.
What happens if the format has an error?
The system checks the widget format during save. Incorrectly formatted content may be displayed as plain text or trigger a warning in the editor.
Can I copy and paste widget content?
Yes. You can copy widget content from one lesson and paste it into another. The editor will read and display it correctly.
How does the AI lesson builder use this format?
The AI generates lesson content including widget data. The system then converts the text into editor content blocks. Understanding the content format helps you read and modify AI-generated content.































