diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index e8d61e9..e2bd860 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -267,13 +267,24 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) { } switch (this.actor.type) { - case "agent": - context.enrichedDescription = + case "agent": { + const enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML( this.actor.system.physicalDescription, - { async: true }, + { + rollData: this.document.getRollData(), + relativeTo: this.document, + }, ); + const { HTMLProseMirrorElement } = foundry.applications.elements; + context.descriptionField = HTMLProseMirrorElement.create({ + name: "system.physicalDescription", + value: this.actor.system.physicalDescription, + enriched: enrichedDescription, + toggled: true, + }).outerHTML; break; + } case "vehicle": context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML( diff --git a/templates/actor/parts/bio-tab.html b/templates/actor/parts/bio-tab.html index f4006ea..3ba3457 100644 --- a/templates/actor/parts/bio-tab.html +++ b/templates/actor/parts/bio-tab.html @@ -98,7 +98,5 @@ {{localize "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes"}} -