Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.73 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.73 KB

Markdown Widget Challenge

Learning Competencies

  • Use basic JavaScript - functions, control structures, scope
  • Build a pure JavaScript application
  • Build a pure JavaScript class
  • Write OO JavaScript

Summary

The goal will be to create a "live" markdown preview widget in JavaScript. When a user enters Markdown text inside a text area, the rendered version is displayed elsewhere on the page.

The goal is to use object-oriented JavaScript to construct a widget. Ideally you should be able to issue the command:

MarkdownWidget("#source-id", "#preview-div")

Releases

Release 0

Set up an object-oriented architecture (possibly Model View Controller or Model View Presenter) that performs a "identity transformation" based on the "keyup" event. That is, return the markdown text as the preview text.

Release 1

Introduce the Markdown converter. You need not implement the full specification, but you should support *, _, and ** for italics, italics, and bold, respectively.

Release 2

Swap out the transformation logic from your implementation to one provided by a third party e.g. markdown-js

Optimize your learning

Notice that sometimes it's helpful to delay the building of the algorithm until later. An identity transformation confirms that the flow works, but doesn't hang your development process in the research of specifics.

Resources