Sub-flow › Add HTML Rich Text
Background: Course Editor (SCR-CCM.02) β€” this dialog opens over the course editing page

Prototype β€” simulate state:

Spec notes

Identity

SUC-CCM-01 Β· Screen: SCR-CCM.19 (Rich Text Editor Dialog)

ReturnUrl context

Current returnUrl: /author-course/
Fallback: / when returnUrl is empty.
Propagation: Save β†’ returnUrl. Cancel β†’ returnUrl + &sub_cancelled=1.

Sub-flow context

SUC-CCM-01 Β· Invoked by (Backoffice Portal): UC-CCM.01 (Author Course Content), step 6 β€” "Add Resource β†’ HTML / Rich Text".
Precondition: A lesson Content Item is selected on SCR-CCM.02 with no content linked yet.
Success: HTML resource created and linked to the lesson β€” Course Editor (SCR-CCM.02) shows the new item in the outline.
Cancel (AF 3A): no data saved; lesson item remains empty.

Screen spec: SCR-CCM.19

  • Regions: Context Header Β· Resource Metadata (title, description) Β· Rich Text Body (content) Β· Footer Actions
  • context_header: read-only Β· computed (course name + destination lesson path)
  • resource_title: required Β· max 255 chars Β· data_ref: CourseDraftResource.title
  • resource_description: optional Β· max 1000 chars Β· data_ref: CourseDraftResource.description
  • rich_text_body: required Β· min 1 char (no upper size limit β€” OI-25 resolved) Β· data_ref: CourseDraftResource.content_html
  • Save enabled when resource_title β‰  "" && rich_text_body β‰  ""
  • Insert image action: inline picker with "Upload" and "From Library" (SCR-CCM.24 in picker mode) tabs; embeds a stable managed-asset reference at the cursor, not an external URL; picker closes on select (SUC-CCM-01-M-2)
  • AR#1: Server-side HTML sanitization removes script, on* attrs, unsafe protocols before saving (SS-CCM.27)
  • AR#2: Embedded images are saved into the course's managed asset library, not as external URLs β€” the reference stays valid regardless of future storage changes
  • Note: this dialog no longer has duration/category fields or a completion-tracking toggle β€” completion tracking for the content item is configured on the Course Editor (SCR-CCM.02, field #28) after the item is added
  • Open issues: OI-25 (HTML size limit) β€” resolved, no limit needed. OI-27 (embedded asset picker) β€” resolved, added insert-image action with Upload/From Library tabs.