feat: init export html button
This commit is contained in:
15
src/main.ts
15
src/main.ts
@@ -30,6 +30,17 @@ Hooks.on('getActorDirectoryEntryContext', async (_, options) => {
|
||||
);
|
||||
await generatePdf(actor);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: i18nLocalize('WFRP4SHEETPRINT.export.html'),
|
||||
condition: isGM(),
|
||||
icon: '<i class="fas fa-file-code"></i>',
|
||||
callback: async (target) => {
|
||||
const actor: Actor & any = (<any>game).actors.get(
|
||||
target.attr('data-document-id')
|
||||
);
|
||||
await generateHtml(actor);
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -60,6 +71,10 @@ function addActorSheetActionButton(
|
||||
title.after(button);
|
||||
}
|
||||
|
||||
async function generateHtml(actor: Actor & any) {
|
||||
console.dir(actor);
|
||||
}
|
||||
|
||||
async function generatePdf(actor: Actor & any) {
|
||||
const actorData = actor.data;
|
||||
// @ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user