Skip to content

Commit

Permalink
Stubbed out the markdown view
Browse files Browse the repository at this point in the history
Added a markdown view with stubbed out methods, plus a markdown template. This view will retrieve and parse markdown.

refs #820
  • Loading branch information
robyngit committed Nov 2, 2018
1 parent 900f718 commit c6376eb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/templates/markdown.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class = "markdown">
<%=parsedMarkdown%>
</div>
41 changes: 41 additions & 0 deletions src/js/views/MarkdownView.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
define(["jquery",
"underscore",
"Backbone",
"text!templates/markdown.html"], function($, _, Backbone, markdownTemplate){

/* The markdownView is a view that will retrieve and parse markdown */
var markdownView = Backbone.View.extend({

/* The markdown Element */
el: ".markdown",

/* TODO: Decide if we need this */
type: "markdown",

/* Renders the compiled template into HTML */
template: _.template(markdownTemplate),

/* The events that this view listens to */
events: {

},

/* Construct a new instance of markdownView */
initialize: function() {

},

/* Render the view */
render: function() {

},

/* Close and destroy the view */
onClose: function() {

}

});

return markdownView;
});

0 comments on commit c6376eb

Please sign in to comment.