Loading editor/html/css/editor.css +18 −0 Original line number Diff line number Diff line Loading @@ -599,6 +599,24 @@ dialog label { font-size: 13px; } .file-upload-label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--bg-tertiary); border: 1px dashed var(--border); border-radius: 6px; cursor: pointer; font-size: 13px; margin-bottom: 8px; transition: border-color 0.15s, background 0.15s; } .file-upload-label:hover { border-color: var(--accent); background: var(--bg-hover); } .dialog-actions { display: flex; gap: 8px; Loading editor/html/index.html +4 −2 Original line number Diff line number Diff line Loading @@ -102,7 +102,8 @@ <dialog id="import-dialog"> <h3 data-i18n="I18N_IMPORT_XML">XML importieren</h3> <textarea id="import-xml-content" rows="15" placeholder="XML hier einfügen..."></textarea> <label class="file-upload-label">📂 <span data-i18n="I18N_UPLOAD_FILE">Datei wählen</span><input type="file" id="import-xml-file" accept=".xml,.txt" style="display:none"></label> <textarea id="import-xml-content" rows="15" placeholder="XML hier einfügen..."></textarea> <div class="dialog-actions"> <button id="btn-import-confirm" data-i18n="I18N_IMPORT_XML">Importieren</button> <button id="btn-import-cancel" data-i18n="I18N_CANCEL">Abbrechen</button> Loading @@ -128,7 +129,8 @@ <dialog id="import-html-dialog"> <h3 data-i18n="I18N_IMPORT_HTML">HTML importieren</h3> <textarea id="import-html-content" rows="15" placeholder="HTML hier einfügen..."></textarea> <label class="file-upload-label">📂 <span data-i18n="I18N_UPLOAD_FILE">Datei wählen</span><input type="file" id="import-html-file" accept=".html,.htm,.txt" style="display:none"></label> <textarea id="import-html-content" rows="15" placeholder="HTML hier einfügen..."></textarea> <div class="dialog-actions"> <button id="btn-import-html-confirm" data-i18n="I18N_IMPORT_HTML">Importieren</button> <button id="btn-import-html-cancel" data-i18n="I18N_CANCEL">Abbrechen</button> Loading editor/html/js/editor.js +22 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,17 @@ }); // Import dialog document.getElementById('import-xml-file').addEventListener('change', function() { var file = this.files[0]; if (!file) return; var reader = new FileReader(); reader.onload = function(e) { document.getElementById('import-xml-content').value = e.target.result; }; reader.readAsText(file); this.value = ''; }); document.getElementById('btn-import-confirm').addEventListener('click', function() { var xml = document.getElementById('import-xml-content').value; if (!xml.trim()) return; Loading Loading @@ -298,6 +309,17 @@ }); // HTML Import dialog document.getElementById('import-html-file').addEventListener('change', function() { var file = this.files[0]; if (!file) return; var reader = new FileReader(); reader.onload = function(e) { document.getElementById('import-html-content').value = e.target.result; }; reader.readAsText(file); this.value = ''; }); document.getElementById('btn-import-html-confirm').addEventListener('click', function() { var html = document.getElementById('import-html-content').value; if (!html.trim()) return; Loading Loading
editor/html/css/editor.css +18 −0 Original line number Diff line number Diff line Loading @@ -599,6 +599,24 @@ dialog label { font-size: 13px; } .file-upload-label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--bg-tertiary); border: 1px dashed var(--border); border-radius: 6px; cursor: pointer; font-size: 13px; margin-bottom: 8px; transition: border-color 0.15s, background 0.15s; } .file-upload-label:hover { border-color: var(--accent); background: var(--bg-hover); } .dialog-actions { display: flex; gap: 8px; Loading
editor/html/index.html +4 −2 Original line number Diff line number Diff line Loading @@ -102,7 +102,8 @@ <dialog id="import-dialog"> <h3 data-i18n="I18N_IMPORT_XML">XML importieren</h3> <textarea id="import-xml-content" rows="15" placeholder="XML hier einfügen..."></textarea> <label class="file-upload-label">📂 <span data-i18n="I18N_UPLOAD_FILE">Datei wählen</span><input type="file" id="import-xml-file" accept=".xml,.txt" style="display:none"></label> <textarea id="import-xml-content" rows="15" placeholder="XML hier einfügen..."></textarea> <div class="dialog-actions"> <button id="btn-import-confirm" data-i18n="I18N_IMPORT_XML">Importieren</button> <button id="btn-import-cancel" data-i18n="I18N_CANCEL">Abbrechen</button> Loading @@ -128,7 +129,8 @@ <dialog id="import-html-dialog"> <h3 data-i18n="I18N_IMPORT_HTML">HTML importieren</h3> <textarea id="import-html-content" rows="15" placeholder="HTML hier einfügen..."></textarea> <label class="file-upload-label">📂 <span data-i18n="I18N_UPLOAD_FILE">Datei wählen</span><input type="file" id="import-html-file" accept=".html,.htm,.txt" style="display:none"></label> <textarea id="import-html-content" rows="15" placeholder="HTML hier einfügen..."></textarea> <div class="dialog-actions"> <button id="btn-import-html-confirm" data-i18n="I18N_IMPORT_HTML">Importieren</button> <button id="btn-import-html-cancel" data-i18n="I18N_CANCEL">Abbrechen</button> Loading
editor/html/js/editor.js +22 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,17 @@ }); // Import dialog document.getElementById('import-xml-file').addEventListener('change', function() { var file = this.files[0]; if (!file) return; var reader = new FileReader(); reader.onload = function(e) { document.getElementById('import-xml-content').value = e.target.result; }; reader.readAsText(file); this.value = ''; }); document.getElementById('btn-import-confirm').addEventListener('click', function() { var xml = document.getElementById('import-xml-content').value; if (!xml.trim()) return; Loading Loading @@ -298,6 +309,17 @@ }); // HTML Import dialog document.getElementById('import-html-file').addEventListener('change', function() { var file = this.files[0]; if (!file) return; var reader = new FileReader(); reader.onload = function(e) { document.getElementById('import-html-content').value = e.target.result; }; reader.readAsText(file); this.value = ''; }); document.getElementById('btn-import-html-confirm').addEventListener('click', function() { var html = document.getElementById('import-html-content').value; if (!html.trim()) return; Loading