Skip to content
Snippets Groups Projects
Commit 15cdca5e authored by rhenck's avatar rhenck
Browse files

Rework cloze element data

- Now only has a variable 'document'. This holds the HTML representation
  in an object. This object is enriched with element models.
- Because the the TextEditor extension can neither create multiple
  element instances nor use the IDService to generate their IDs, this
  has to be done afterwards. See ClozeParser.
- The cloze element has rather extensive compatibility handling because
  cloze elements used to save an actual HTML representation. This has to
  be transformed to JSON/object. Therefore we replace the old backslash-
  markers with custom HTML tags. The editor object does this
  transformation. It needs some custom extensions to recognize (and
  don't remove) the HTML tags though.
- Cloze now shows a placeholder text when empty
- The cloze component needs a small pipe to extract text formatting
  options from the paragraph parts.
- For getting the child elements for the player the models have to be
  extracted from the somewhat complex (JSON)document.
- Added some rudimentary interfaces for the TextEditor document format.
- Removed the old ClozePart interface. This is quasi part of the new
  interfaces.
parent 71575dd6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment