Texr Formats (for All)

Texr Formats (for All)

by Howard Miller -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I would like to take a look at sorting out text formats for the remaining textarea edit boxes, ie., Moodle Format, HTML, Markdown etc.

I think the hard bit is deciding how to store the format along with the text. Whatever is chosen needs to be completely consistent and predictable and needs to extend over tables that have more than one editing field in each record. The upshot is that a fixed set of library functions can be developed, so it's simply a matter of calling a library function(s) to display/read the text box and select field.

Some ideas... some more mad than others!

  • Add an additional database field for each text field using a standard convention (e.g, if the field is called description the format will be stored in description_format)
    • pros: logical
    • cons: database changed everywhere. Lots of updates and backup/restore grief
  • Add a 'hidden' field into every text box - a magic code of some sort.
    • pros: no or few db changes
    • cons: weird way to do things
  • Something else!

As an aside, I would also want to make the text formats 'pluggable' extensions of a base class - the way most things are going.

Thoughts / abuse appreciated smile

Average of ratings: -