sync, implemented sort, viewing user pages & articles written, updating db

This commit is contained in:
2025-04-03 10:50:58 -06:00
parent cec9091ee0
commit e5af3aca66
12 changed files with 231 additions and 54 deletions
+17
View File
@@ -0,0 +1,17 @@
// Optional: Real-time preview using JavaScript
const textarea = document.querySelector('textarea');
const preview = document.getElementById('preview');
textarea.addEventListener('input', function() {
fetch('preview.php', { // Create a separate preview.php file for real-time updates
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: 'markdown=' + encodeURIComponent(this.value),
})
.then(response => response.text())
.then(data => {
preview.innerHTML = data;
});
});