ItemFeatures are now prepended to the description

This commit is contained in:
WBHarry 2026-01-10 15:32:32 +01:00
parent 0b343c9f52
commit 9d353fe54a
9 changed files with 97 additions and 16 deletions

View file

@ -76,16 +76,10 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
/**@inheritdoc */
async _preparePartContext(partId, context, options) {
await super._preparePartContext(partId, context, options);
const { TextEditor } = foundry.applications.ux;
switch (partId) {
case 'description':
const value = foundry.utils.getProperty(this.document, 'system.description') ?? '';
context.enrichedDescription = await TextEditor.enrichHTML(value, {
relativeTo: this.item,
rollData: this.item.getRollData(),
secrets: this.item.isOwner
});
context.enrichedDescription = await this.document.system.getEnrichedDescription(true);
break;
case 'effects':
await this._prepareEffectsContext(context, options);