Content Blocks

The Editor V2 creates liveblog entries as an array of content block. Each block has at least the following fields:

  • _type: indicating what kind of content block it is.
  • local_id: a unique id of the content block

Tik::Model::Content::RichTextContentBlock

Displays a block of HTML.

{
  "_type": "Tik::Model::Content::RichTextContentBlock",
  "local_id": "",
  
  // HTML Formated rich text
  "text": ""
}

We only allow a specific subset of HTML Tags, all other tags will be stripped out!

  <!-- target and rel will be added automatically! -->
  <a href="" target="_blank" rel="nofollow">...</a>  
  <blockquote>...</blockquote>
  <b>...</b>
  <strong>...</strong>
  <i>...</i>
  <em>...</em>
  <u>...</u>
  <strike>...</strike>
  <s>...</s>
  <del>...</del>
  <h1>...</h1>
  <h2>...</h2>
  <h3>...</h3>
  <h4>...</h4>
  <h5>...</h5>
  <ul>...</ul>
  <ol>...</ol>
  <li>...</li>
  <div>...</div>
  <span>...</span>
  <p>...</p>
  <br>

Tik::Model::Content::MultiMediaContentBlock

Displays one or more pictures/videos. For more details about the data structure refer to the Media Documentation.

{
  "_type": "Tik::Model::Content::MultiMediaContentBlock",
  "local_id": "",
  
  // List of media items to display
  "items": []
  
  // Either "slideshow" or "default", if null or empty string "default" is used
  "display_type": ""
}

Tik::Model::Content::WebEmbedContentBlock

Displays either a rich link or an embed (depending on target and consent settings)

{
  "_type": "Tik::Model::Content::WebEmbedContentBlock",
  "local_id": "",
  
  // The URL or Embed Code the of the target
  "url": ""
  
  // Contains information obtained by oembed lookups (plus tickaroo proprietary additions)
  "oembed_json": ""
}

Tik::Model::Content::QuoteContentBlock

Special way to display an author and quote

{
  "_type": "Tik::Model::Content::QuoteContentBlock",
  "local_id": "",
  
  // Plain text quote
  "text": ""
  
  // Plain text author name
  "author": ""
  
  // if set, author will link to this URL
  "source": ""
}

Tik::Model::Content::EmojiContentBlock

Displays a big emoji followed by rich text HTML.

{
  "_type": "Tik::Model::Content::EmojiContentBlock",
  "local_id": "",

  // The UTF code of the emoji to display
  "emoji": "",

  // HTML formatted rich text
  "title": ""
}

Tik::Model::Content::PlayerCardContentBlock

Displays a card showcasing a single player: photo, name, description and a fact list (position, number, in team since, nationality, birthday, weight, height), plus social media links.

{
  "_type": "Tik::Model::Content::PlayerCardContentBlock",
  "local_id": "",

  // The player to display
  "player": {
    "_type": "Tik::Model::Player",
    "_id": "",
    "name": "",
    // Player photo: an HTTPS URL or an imageservice:// URI,
    // see the Image Service section of the Media Documentation
    "image": "",
    // Free-text description shown below the name
    "about": "",
    "birthdate": 132456789,
    "gender": "m",
    // Shirt number (string, can contain text)
    "number": "",
    "position": "",
    // Unix timestamp in seconds
    "team_member_since": 123456789,
    // Uppercase ISO 3166-1 alpha-2 code, displayed as the localized country name
    "country": "ES",
    // Weight in grams (displayed as kg)
    "weight": 77000,
    // Height in centimeters
    "height": 184,
    // Social media links
    "facebook": "",
    "twitter": "",
    "instagram": ""
  }
}

All player fields except name are optional; the card only renders the facts that are set. See the Player API Documentation for the full model, field units and the known position values.

Tik::Model::Content::SportEventContentBlock

Displays a sport event (goal, penalty, etc.) inline with other content. For more details about the data structure refer to the Sport Event Documentation.

{
  "_type": "Tik::Model::Content::SportEventContentBlock",
  "local_id": "",
  "sportstype": "",
  "event_type": "",
  "title": "",
  "team": {},
  "players": [],
  "phase": {},
  "time_of_play": "",
  "is_cancelled": false
}

Tik::Model::Content::ScoreboardContentBlock

Displays a scoreboard within your liveblog. For details about the scoreboard structure refer to the Scoreboard Documentation.

{
  "_type": "Tik::Model::Content::ScoreboardContentBlock",
  "local_id": "",
  
  // The scoreboard to display
  "scoreboard": {}
}

Tik::Model::Content::PollContentBlock

Displays a poll within your liveblog

  {
    "_type":  "Tik::Model::Content::PollContentBlock",
    "local_id": "",

    // Unix timestamp in seconds when the poll closes
    "closes_at": 123456789,

    // Question Text:
    "question": "",

    // Answers
    "answers": [
      {
        "_type": "Tik::Model::Content::PollAnswerContent",
        "local_id": "",
        "text": ""
      }
    ]
  }

Tik::Model::Content::QuizContentBlock

Displays a multiple-choice quiz. Unlike a poll, each question has a correct answer, revealed after the reader picks one.

{
  "_type": "Tik::Model::Content::QuizContentBlock",
  "local_id": "",

  "questions": [
    {
      "_type": "Tik::Model::Content::MultipleChoiceSingleAnswerQuizQuestionContent",
      "local_id": "",

      // Question text
      "question": "",

      // Optional: image displayed with the question
      "image": {},

      // Answer options
      "answers": [
        {
          "_type": "Tik::Model::Content::QuizAnswerContent",
          "local_id": "",
          "text": ""
        }
      ],

      // local_id of the correct answer in "answers"
      "correct_answer_local_id": "",

      // Optional: explanation shown after answering
      "answer_details": "",

      // Optional: URL for further reading, shown with the explanation
      "info_link": ""
    }
  ]
}