Amelioration des talents et quelques corrections

This commit is contained in:
2026-06-23 17:40:57 +02:00
parent d1fbe611ef
commit dd0276e7e1
87 changed files with 366 additions and 245 deletions
@@ -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;
}
}