implemented spaces, fixed login and signup, thought creation and space creation.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
const textarea = document.querySelector('textarea');
|
||||
const preview = document.getElementById('md_preview');
|
||||
|
||||
textarea.addEventListener('input', function() {
|
||||
fetch('functions/preview.php', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: 'markdown=' + encodeURIComponent(this.value),
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
preview.innerHTML = decodeURIComponent(data);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user