Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin committed Feb 27, 2020
1 parent 6bdd3d0 commit dfc2617
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions static/js/home.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
function convert_md_to_html(){
console.log('ran convert_md_to_html()')
// Get markdown to convert
var notes = document.getElementById('notes').value
// function convert_md_to_html(){
// console.log('ran convert_md_to_html()')
// // Get markdown to convert
// var notes = document.getElementById('notes').value

var converter = new showdown.Converter({'tables':true}); // local option for enabling tables in MD.
var html = converter.makeHtml(notes);
// var converter = new showdown.Converter({'tables':true}); // local option for enabling tables in MD.
// var html = converter.makeHtml(notes);

var output_html = document.getElementById('output-html')
output_html.innerHTML = html
// var output_html = document.getElementById('output-html')
// output_html.innerHTML = html

// Adjust what is shown
if (document.getElementById('notes').style.display === 'none') {
document.getElementById('notes').style.display = 'block'
document.getElementById('output-html').style.display = 'none'
// // Adjust what is shown
// if (document.getElementById('notes').style.display === 'none') {
// document.getElementById('notes').style.display = 'block'
// document.getElementById('output-html').style.display = 'none'

} else {
document.getElementById('notes').style.display = 'none'
document.getElementById('output-html').style.display = 'block'
// } else {
// document.getElementById('notes').style.display = 'none'
// document.getElementById('output-html').style.display = 'block'

}
}
// }
// }

function toggle_image_upload() {
// function toggle_image_upload() {

var upload_image_position = document.getElementsByClassName('fl-fl')[0]
// var upload_image_position = document.getElementsByClassName('fl-fl')[0]

if (upload_image_position.style.right === '100px') {
upload_image_position.style.right = "-7000px"
} else {
upload_image_position.style.right = "100px"
}
// if (upload_image_position.style.right === '100px') {
// upload_image_position.style.right = "-7000px"
// } else {
// upload_image_position.style.right = "100px"
// }

}
// }



0 comments on commit dfc2617

Please sign in to comment.