     @rootDirectoryPath = @editor.getDirectoryPath()
     @projectDirectoryPath = @getProjectDirectoryPath()
     @firstTimeRenderMathJax = true
+    @firstTimeRenderMarkdowon = true
 
     if @disposables # remove all binded events
       @disposables.dispose()

    @bindEvents()

    @mainModule.emitter.emit 'on-did-render-preview', {htmlString: html, previewElement: @element}

  bindEvents: ->
    @bindTagAClickEvent()


    # this variable will check if it is the first time to render MathJax for markdown.
    @firstTimeRenderMathJax = true

    # this variable will check if it is the first time to render markdown
    @firstTimeRenderMarkdowon = true

    # presentation mode
    @presentationMode = false
