Amelioration des talents et quelques corrections
This commit is contained in:
@@ -22,6 +22,16 @@ export default class MournbladeCYD2ProfilSheet extends MournbladeCYD2ItemSheetV2
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext();
|
||||
const item = this.document;
|
||||
|
||||
// Enrich each HTMLField for ProseMirror display
|
||||
for (const field of ["competences", "talentsinitie", "prerequisaguerri", "talentsaguerri", "prerequismaitre", "talentsmaitre"]) {
|
||||
const enrichedKey = `enriched${field.charAt(0).toUpperCase() + field.slice(1)}`;
|
||||
context[enrichedKey] = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
||||
item.system[field] || "", { async: true }
|
||||
);
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user