S
Speakly.PRO

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

ParameterValuesDefaultEditable
shuffletrue, falsetrueYes
uiclassic, childrenclassicYes (theme toggle)
instructionany 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

ParameterValuesDefaultEditable
instructionany string(none)Yes
uiclassic, childrenclassicYes (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
!! under

Settings

ParameterValuesDefaultEditable
instructionany string(none)Yes
hinttrue, falsefalseYes
uiclassic, childrenclassicYes (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

ParameterValuesDefault
instructionany string(none)
uiclassic, childrenclassic

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
[-] House

Settings

ParameterValuesDefaultEditable
instructionany string(none)Yes
shuffletrue, falsetrueYes
show_counttrue, falsetrueYes
uiclassic, childrenclassicYes (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
- sleep

Items 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
- water

Students 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

ParameterValuesDefaultEditable
layouthorizontal, verticalhorizontalYes
instructionany string(none)Yes
uiclassic, childrenclassicYes (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

ParameterValuesDefaultEditable
instructionany string(none)Yes
show_progresstrue, falsetrueYes
uiclassic, childrenclassicYes (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

ParameterValuesDefaultEditable
gridauto, 2x3, 2x4, 3x4, 4x4, 4x5autoYes
instructionany string(none)Yes
time_limitseconds(none)
show_timertrue, falsetrue
uiclassic, childrenclassicYes (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

ParameterValuesDefaultEditable
hint_typetranslation, definition, first-letter, nonetranslationYes
instructionany string(none)Yes
attemptsnumber (1-10)3Yes
uiclassic, childrenclassicYes (theme toggle)

Word Search Widget

Students find hidden words in a letter grid.

Content Format

Each line: word (optional clue):

- apple (яблоко)
- house (дом)
- cat (кот)

Settings

ParameterValuesDefaultEditable
grid_sizenumber (6-15)10Yes
directionshorizontal, vertical, diagonal (comma-separated)horizontal,verticalYes
instructionany string(none)Yes
show_word_listtrue, falsetrueYes
time_limitseconds (0 = no limit)0Yes
uiclassic, childrenclassicYes (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 live

Settings

ParameterValuesDefaultEditable
hints_allowednumber (0-10)3Yes
instructionany string(none)Yes
uiclassic, childrenclassicYes (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

ParameterValuesDefaultEditable
instructionany string(none)Yes
distractorsnumber0Yes
uiclassic, childrenclassicYes

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:

AttributeValuesDefault
type or styleinfo, warning, question, exam, children, quoteinfo
positionleft, centered, rightleft
sizefull, mid, smallfull

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 here

Settings: 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:

ParameterValuesDefaultEditable
target linesup to 10 slides; each target max 5 words / 60 charsat least one targetYes
languagestored from the course language, such as en, pl, de, or frcourse languageNo
difficultyeasy, normal, strictnormalYes

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:

ParameterValuesDefaultEditable
taskb1-nawa-speaking-rolab1-nawa-speaking-rolaUsually generated by the exam preset
maxDurationseconds180Usually 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:

ParameterValuesDefaultEditable
set_idnumber or numeric string0Usually generated by the exam preset
idpart id, such as p1 or p2requiredUsually generated by the exam preset
subtypeannouncement, invitation, postcard, well-wish, essay, narrative, email, character-description, reportrequiredYes
min / maxtarget word rangerequiredYes
allow_texttrue, falsetrueYes
allow_imagetrue, falsetrueYes
max_imagesnumber3Yes

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 backwards

Settings: theme (physical, vocabulary, mindfulness, fun), ui (classic, children).

Drawing Board

Drawing prompt text:

Draw a cat using only circles

Settings: 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 fly

Settings: 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.