Class: MarkdownView

MarkdownView()

A view of markdown content rendered into HTML with optional table of contents

Constructor

new MarkdownView()

Source:

Extends

  • Backbone.View

Members

citations :Array

An array of literature cited
Type:
  • Array
Source:

className :string

The HTML classes to use for this view's element
Type:
  • string
Source:

events :Object

The events this view will listen to and the associated function to call.
Type:
  • Object
Source:

markdown :string

Markdown to render into HTML
Type:
  • string
Source:

showTOC :boolean

Indicates whether or not to render a table of contents for this view. If set to true, a table of contents will be shown if there two or more top-level headers are rendered from the markdown.
Type:
  • boolean
Source:

template :UnderscoreTemplate

Renders the compiled template into HTML
Type:
  • UnderscoreTemplate
Source:

type :string

The type of View this is
Type:
  • string
Source:

Methods

initialize(options)

Initialize is executed when a new MarkdownView is created.
Parameters:
Name Type Description
options Object A literal object with options to pass to the view
Source:

listRequiredExtensions(markdown)

listRequiredExtensions - test which extensions are needed, then load them
Parameters:
Name Type Description
markdown string The markdown string before it's converted into HTML
Source:

onClose()

onClose - Close and destroy the view
Source:

render()

render - Renders the MarkdownView; converts markdown to HTML and displays it.
Source:

renderTOC()

Renders a table of contents (a TOCView) that links to different sections of the MarkdownView
Source: