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:
1 parent
eff8cf5e60
commit
68ec9af806
1 file changed
+3
-2
+3
-2
@@ -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>`
|
? `<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>`;
|
: `<a href="${result.url}" target="_blank">📄 ${result.originalName}</a>`;
|
||||||
if (type === 'assignment') {
|
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 {
|
} else {
|
||||||
$('#ie-body-lesson').innerHTML = embed;
|
$('#ie-body-lesson').innerHTML += embed;
|
||||||
}
|
}
|
||||||
$('#import-status').textContent = '✅ File uploaded. Document embedded in body.';
|
$('#import-status').textContent = '✅ File uploaded. Document embedded in body.';
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in new issue
Block a user