OptionaladditionalExtra tabs to add after the editor's built-in tabs. Each tab
renders its content via the supplied render() function. Used
by consumers (e.g. a music app's "Practice" / "Submissions"
tabs) to fold app-specific panes into the editor's tab strip
rather than wrapping the editor with their own tabs above it.
The editor's title bar stays visible above the tabs regardless
of which tab is selected.
OptionalassignmentControlled assignment title — when supplied, overrides the
editor's internal title state on every render. Pair with
onTitleChange for two-way sync. Use this when the consumer
renders the title outside the editor (e.g. above its own tab
strip) and needs the persistence layer to save with that value.
OptionalautoAuto-save interval in milliseconds (default: 3000)
OptionalautoAuto-start an activity session when the editor mounts. Only takes
effect for assignees (the user is in assignedTo and is not the
owner) and when enableActivityTracking is true. The session
auto-ends on unmount, so the time spent reading / working on the
assignment lands in userActivities without the assignee needing
to remember to press Start. The editor exposes the timer state
via onActivityTimerChange so the consumer can render the
pause/resume UI wherever it fits in their layout.
(default: false)
OptionalcolorsCustom colors
OptionalcompletedOptional controlled value for the per-assignee completion list.
When provided, the editor renders this value instead of its own
internal state, and surfaces all completion changes through
onCompletedByChange for the host to apply. Use this when the
host needs to mutate completion from outside (e.g. a teacher
toggling per-student completion in a separate panel).
Omitting the prop falls back to internal state seeded from
initialAssignment.completedBy.
OptionaldisabledWhether the panel is disabled
OptionalenableEnable per-user activity tracking with session timers (default: false)
OptionalenableEnable auto-save to file storage (default: false)
OptionalenableEnable the inline file embed feature (default: true). Drives the
toolbar's "Insert file" action; the actual picker UI is supplied
by the consumer via onPickFile.
OptionalenableEnable highlighting (default: true)
OptionalenableEnable table support (default: true)
OptionalenableEnable task list support (default: true)
OptionalfileExisting file ID to update (for editing existing assignments)
OptionalfileFile storage location (default: '/Assignments')
OptionalfooterOptional footer content rendered below the active tab content, pinned to the bottom of the editor. Useful for ambient tools the student should always see (e.g. a metronome). Receives no props — the consumer renders whatever they want.
OptionalhideHide just the "Assigned to" row inside the metadata panel — useful for non-owners (e.g. students) who shouldn't see who else is on the assignment. Has no effect when showMetadata is false. (default: false)
OptionalhideSuppress the editor's built-in activity tabs entirely (both the
owner's "Activity Dashboard" and the assignee's "My Activity").
Activity tracking still runs in the background — only the tab UI
is hidden. Use this when the consumer renders its own activity
surface via additionalTabs and the built-in tabs would be
redundant. (default: false)
OptionalhideSuppress the per-viewer "Mark complete" / "Re-open" button in the
metadata bar. Set this when completion is driven externally (e.g.
the assignment owner toggles each student's status from a separate
activity panel rather than letting assignees self-mark). When true,
completedBy mutation is the host's responsibility — typically by
passing a controlled completedBy array and updating it via the
onCompletedByChange callback. (default: false)
OptionaliconsCustom icons
OptionalinitialInitial assignment data to populate all fields
OptionalinitialInitial content for the editor (TipTap JSON format)
OptionalinitialInitial title for the assignment
OptionalisOverride ownership check. When true, always treats user as owner.
OptionallabelsCustom labels for i18n support
OptionalmaxMaximum height before scrolling
OptionalminMinimum height of the editor
OptionalonFires synchronously whenever an activity session is ended (Stop
button or editor unmount). The consumer can mirror it to its own
persistence layer immediately, without waiting on the editor's
debounced auto-save — which doesn't get a chance to fire when the
editor unmounts. Sub-minute sessions are rounded up to 1 minute by
the tracker, matching what's stored in userActivities.
OptionalonReceives the current activity-timer state (and its controls) every
time it changes. The consumer renders the pause / resume / stop UI;
the editor itself does not draw a timer bar. Only fires when
enableActivityTracking is true.
OptionalonCallback after successful auto-save with file ID
OptionalonCallback when editor is blurred
OptionalonCallback when content changes
OptionalonClose callback — renders a close button in the title bar
OptionalonCallback fired whenever the per-assignee completion list changes (e.g. an assignee clicks Mark complete or Re-open). Hosts use it to disable submission UI and timers for assignees who have marked the assignment complete on their side.
OptionalonCallback when editor is focused
OptionalonClick handler for an embed card. Typical implementation: open a modal preview. When omitted, embed cards render but aren't clickable.
OptionalonOptional handler for an "Open existing" affordance rendered in the title bar (left of the title field). Useful when the editor was opened on a fresh blank file and the user wants a way back to a file picker. Omit to hide the button.
OptionalonPicker callback fired when the toolbar's "Insert file" action runs.
The consumer renders their own picker UI (file manager modal, etc.)
and resolves with the chosen file or null if cancelled. The SDK
never owns the picker — it owns the schema + insertion.
OptionalonCallback after successful save
OptionalonCallback on save error
OptionalonCallback when assignment status changes
OptionalonCallback when title changes
OptionalparticipantsOverride for the participant list the metadata panel uses to populate
the "assigned to" picker. By default the editor reads participants
from useParticipants() (lesson-room context). When the editor is
mounted outside a lesson room — e.g. inside the file-manager
overlay — the lesson-room context is empty; supply this prop with
the consumer's own roster (the teacher's students) so the picker
still works.
OptionalplaceholderPlaceholder text when editor is empty
OptionalpracticedTotal minutes practiced so far. Only consulted in read-only mode, where it's used to display "X min remaining" against the time estimate. Pass the consumer's running total (e.g. PracticeLog minutes plus the live session) so the label ticks down as the student works.
OptionalreadWhether the editor is read-only
OptionalrenderOptional render-prop slots for customising parts of the editor
chrome. Mirrors the pattern in NoteEditor so hosts can inject
extra controls (e.g. an AI Magic button) into the toolbar
without forking the component.
OptionalresolveResolves a fileId to a renderable URL (presigned link, public
URL, blob URL, etc.). The image-kind embed uses this to render an
inline thumbnail; other kinds may use it later. Without it, embeds
still render with name + icon.
OptionalrestrictWhen true, only assignees see the "My Activity" tab. The owner sees the Activity Dashboard (read-only view of every assignee's progress) but no controls to log their own session — useful when the owner is the teacher who shouldn't be doing the assignment themselves. (default: false — preserves the v1 behaviour where owners get both the dashboard tab and a My Activity tab.)
OptionalshowShow the header (default: true)
OptionalshowShow the metadata panel with due date, time, status, and assignees (default: false)
OptionalshowShow the tab bar for switching between editor, activity, and my activity views (default: false)
OptionalshowShow the title input field (default: true)
OptionalshowShow the toolbar (default: true)
OptionalstylesCustom styles
OptionalsxMUI sx styling prop
OptionaltitleHeader title for the assignments panel (default: 'Assignments')
OptionaluserOverride for the saved authorId / modifiedBy and ownership-derivation
userId. When supplied, takes precedence over the lesson-room
localParticipant.userId. Required when the editor opens outside a
lesson room (e.g. file manager / library) — without this, the SDK's
participant context is empty and assignments save with an empty
authorId, which then fails ownership checks on reopen.
OptionaluserOptional display name paired with userId. Stored as authorName /
modifiedBy metadata. Falls back to localParticipant.userName.
Props for the AssignmentEditor component.
Remarks
The AssignmentEditor provides a rich text editing interface using TipTap with assignment-specific features including due dates, time estimates, status tracking, user assignment, and per-user activity tracking.
Features:
Example
Basic usage inside HiyveProvider:
Example
With customization: