Files
noteapp/app/static/js/app.js
Nicolay Braetter 5c7ce5d0ca Initial commit: Notes Manager App (notes.braetter-int.de)
- Python/Flask Backend
- SQLAlchemy Models (notes, tasks, templates, users)
- Gunicorn + Nginx Deploy-Konfiguration
- Static Assets (CSS/JS)
- Jinja2 Templates
2026-04-15 09:28:33 +02:00

15 lines
535 B
JavaScript
Executable File

document.addEventListener('DOMContentLoaded', () => {
const content = document.getElementById('content');
document.querySelectorAll('.template-btn').forEach(btn => {
btn.addEventListener('click', () => {
if (!content) return;
const tpl = btn.getAttribute('data-template');
if (content.value.trim() && !confirm('Vorhandenen Inhalt durch Vorlage ersetzen?')) {
return;
}
content.value = tpl;
content.focus();
});
});
});