OK, so I tried to make a more formatted text editor barebones for Morfy as a starter. Save this file in your content folder as add.php, then open in your browser → http://localhost/{path-where-morfy-installed}/content/add.php
Remember that this editor does not have any login system. So do the test on the local server only.
It would be safe when combined with Nakome's plugin above, especially for the login feature.
If you want to create applications for editing, then it is almost the same, except that the value of each field should be set by default. Something like this:
<?php
// edit.php?file=blog/hello
if(isset($_GET['file']) && Morfy::factory()->getPage($_GET['file'] . '.md')) {
$file = Morfy::factory()->getPage($_GET['file'] . '.md');
} else {
echo 'No file selected.';
return false;
}
?>
<form method="post">
<label>Title:</label>
<input type="text" name="title" value="<?php echo $file['title']; ?>">
<button type="submit">Update</button>
</form>
Indeed, I also need this kind of text editor features. I think I'm starting to like this CMS. It's simpler than Jekyll
XSS Testing <script>alert('HIYAA!!!');</script>