Append imported docs to body instead of replacing

Each imported .docx now adds its iframe below any existing body content
so multiple documents can be attached to a single item.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-07-30 08:59:46 -04:00
1 parent eff8cf5e60
commit 68ec9af806
1 file changed
+3 -2
+3 -2
View File
@@ -624,9 +624,10 @@ $('#import-go-btn').addEventListener('click', async () => {
? `<iframe src="${result.htmlUrl}" style="width:100%;height:600px;border:1px solid #ccc;border-radius:4px;"></iframe>\n<p><a href="${result.url}" download="${result.originalName}">⬇️ Download ${result.originalName}</a></p>`
: `<a href="${result.url}" target="_blank">📄 ${result.originalName}</a>`;
if (type === 'assignment') {
$('#ie-body-assignment').value = embed;
const cur = $('#ie-body-assignment').value;
$('#ie-body-assignment').value = cur ? cur + '\n\n' + embed : embed;
} else {
$('#ie-body-lesson').innerHTML = embed;
$('#ie-body-lesson').innerHTML += embed;
}
$('#import-status').textContent = '✅ File uploaded. Document embedded in body.';
} catch (err) {