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

Code

Class: Chunk OboNode  Full Name: ObojoboDraft.Chunks.Code

This chunk is fundamentally identical to the Text node except the styling of the rendered output is mono-spaced.

Properties

Property Required Type Description
textGroup Required textGroup Expects 1 or more text items.

Supported Trigger Types

Action Type Description
onMount Fired when a node is added to the DOM
onUnmount Fired when a node is removed from the DOM

Required Children

None

Variables Registered

None

Example JSON

{
	"type": "ObojoboDraft.Chunks.Code",
	"id": "...",
	"content": {
		"textGroup": [
			{
				"text": {
					"value": "let x = 2;"
				}
			},
			{
				"text": {
					"value": "return x * 4;"
				}
			}
		]
	}
}

Example XML

<Code>
  <textGroup>
    <t>let x = 2;</t>
    <t>return x * 4;</t>
  </textGroup>
</Code>

Example OboHTML

<pre>let x = 2;
return x * 4;</pre>
  • Properties
  • Supported Trigger Types
  • Required Children
  • Variables Registered
  • Example JSON
  • Example XML
  • Example OboHTML
Visit Obojobo on GitHub
Obojobo
Obojobo™ ©2021 University of Central Florida