- Python/Flask Backend - SQLAlchemy Models (notes, tasks, templates, users) - Gunicorn + Nginx Deploy-Konfiguration - Static Assets (CSS/JS) - Jinja2 Templates
15 lines
535 B
JavaScript
Executable File
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();
|
|
});
|
|
});
|
|
});
|