Obojobo

Obojobo

  • Authors
  • Developers
  • GitHub

› Developers Section Topics

Getting Started

  • OboNode Structure
  • Text Content Conventions
  • Triggers and Actions

Misc Dev Topics

  • Obojobo Glossary
  • Question Selection Algorithm
  • Range Strings

Events Reference

  • Caliper Event Reference
  • Obojobo Event Reference

OboNode & Content Block Reference

  • ActionButton
  • Assessment
  • Assessment > rubric
  • Assessment > rubric > mod
  • Assessment > scoreAction
  • Break
  • Code
  • Content
  • Figure
  • Heading
  • HTML
  • IFrame
  • List
  • List > listStyle
  • List > listStyle > indent
  • Materia
  • MathEquation
  • MCAssessment
  • MCAssessment > MCChoice
  • MCAssessment > MCChoice > MCAnswer
  • MCAssessment > MCChoice > MCFeedback
  • Module
  • NumericAssessment
  • NumericAssessment > NumericChoice
  • NumericAssessment > NumericChoice > NumericAnswer
  • NumericAssessment > NumericChoice > NumericFeedback
  • Page
  • Question
  • QuestionBank
  • Table
  • Table > gridTextGroup
  • Text
  • textGroup
  • textGroup > textItem
  • textGroup > textItem > styleableText
  • textGroup > textItem > styleableText > styleList
  • trigger
  • trigger > action
  • YouTube

textGroup > textItem > styleableText

Class: Content Block

A StyleableText is a string of text with defined styles for specified ranges.

Properties

Property Required Type Description
value Required String The string of text to display.
styleList no StyleList The styles to apply to the text

Required Children

None

Variables Registered

None

Example

Learn more about using text in Text Content Conventions, where Obojobo’s supported XML styling tags are detailed.

JSON

"text": {
  value: "Hello World",
  styleList: [
    {
      type: "b",
      start: 0,
      end: 5
    }
  ]
}

OboXML

<b>Hello</b> World

This would produce the following text:

Hello World

JSON (Inline Math)

"text": {
  "value": "Theta is \\theta and pi is \\pi.",
  "styleList": [
    {
      "type": "_latex",
      "start": 9,
      "end": 15,
      "data": {
        "alt": "theta"
      }
    },
    {
      "type": "_latex",
      "start": 26,
      "end": 29,
      "data": {
        "alt": "pi"
      }
    }
  ]
}

OboXML (Inline Math)

Theta is <latex alt="theta">\theta</latex> and pi is <latex alt="pi">\pi</latex>.

This would produce the following render:

Theta is ϴ and pi is π

  • Properties
  • Required Children
  • Variables Registered
  • Example
    • JSON
    • OboXML
    • JSON (Inline Math)
    • OboXML (Inline Math)
Visit Obojobo on GitHub
Obojobo
Obojobo™ ©2021 University of Central Florida