Working file loading!
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m22s

This commit is contained in:
2026-03-09 09:57:05 -05:00
parent 1c8e8b1d54
commit 092e139f6e
2 changed files with 42 additions and 7 deletions
+23 -3
View File
@@ -33,9 +33,29 @@ export const FileViewer = Node.create<FileViewerOptions>({
addAttributes() {
return {
jobId: { default: null },
collectionId: { default: 'Job_Info_Prod' },
filename: { default: null },
jobId: {
default: null,
parseHTML: element => element.getAttribute('data-job-id'),
renderHTML: attributes => {
if (!attributes.jobId) return {};
return { 'data-job-id': attributes.jobId };
},
},
collectionId: {
default: 'Job_Info_Prod',
parseHTML: element => element.getAttribute('data-collection-id') || 'Job_Info_Prod',
renderHTML: attributes => {
return { 'data-collection-id': attributes.collectionId || 'Job_Info_Prod' };
},
},
filename: {
default: null,
parseHTML: element => element.getAttribute('data-filename'),
renderHTML: attributes => {
if (!attributes.filename) return {};
return { 'data-filename': attributes.filename };
},
},
};
},