Remove / Change taxonomy on button click, assuming the GRAV user is logged in.
I have tried:
---
taxonomy:
tag:
- mountain
<code>
<script>
function removeTg() {
var ret = "mountain".replace('mountain','');
}
</script>
</code>
---
<button onclick="removeTg()">Remove tag</button>
Any idea how to make scripts execute and change .md file content / strings, in a section wrapped by?
---
as non visible .md taxonomy page content.
---
If you want to run a script by clicking on a button defined inside the Markdown content of a Grav page file (.md), the following snippet will work:
Of course, this doesn't do much. If you want to change to content of the
.md
file on the server, the script will need to submit a request to the server. A custom Grav plugin will then catch the request and update/save the.md
file.A few notes: