From f08ec8eaff8f5fbfe7d86cabe40335187b00fd6a Mon Sep 17 00:00:00 2001 From: sladecraven Date: Tue, 27 Sep 2022 21:27:38 +0200 Subject: [PATCH] Enable links in editor --- modules/mournblade-actor-sheet.js | 1 + modules/mournblade-item-sheet.js | 4 ++++ system.json | 4 ++-- templates/actor-sheet.html | 2 +- templates/item-don-sheet.html | 2 +- templates/partial-item-description.html | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/mournblade-actor-sheet.js b/modules/mournblade-actor-sheet.js index 759f814..11666c4 100644 --- a/modules/mournblade-actor-sheet.js +++ b/modules/mournblade-actor-sheet.js @@ -53,6 +53,7 @@ export class MournbladeActorSheet extends ActorSheet { metier: duplicate(this.actor.getMetier() || {}), combat: this.actor.getCombatValues(), equipements: duplicate(this.actor.getEquipments()), + description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}), options: this.options, owner: this.document.isOwner, editScore: this.options.editScore, diff --git a/modules/mournblade-item-sheet.js b/modules/mournblade-item-sheet.js index 1f8bad8..540bc71 100644 --- a/modules/mournblade-item-sheet.js +++ b/modules/mournblade-item-sheet.js @@ -63,10 +63,14 @@ export class MournbladeItemSheet extends ItemSheet { limited: this.object.limited, options: this.options, owner: this.document.isOwner, + description: await TextEditor.enrichHTML(this.object.system.description, {async: true}), mr: (this.object.type == 'specialisation'), isGM: game.user.isGM } + if ( objectData.type =="don") { + sacrifice = await TextEditor.enrichHTML(this.object.system.sacrifice, {async: true}) + } //this.options.editable = !(this.object.origin == "embeddedItem"); console.log("ITEM DATA", formData, this); return formData; diff --git a/system.json b/system.json index f555f03..5298b97 100644 --- a/system.json +++ b/system.json @@ -1,7 +1,7 @@ { "id": "fvtt-mournblade", "description": "Mournblade RPG for FoundryVTT", - "version": "10.0.5", + "version": "10.0.6", "authors": [ { "name": "Uberwald/LeRatierBretonnien", @@ -15,7 +15,7 @@ "gridUnits": "m", "license": "LICENSE.txt", "manifest": "https://www.uberwald.me/gitea/public/fvtt-mournblade/raw/branch/v10/system.json", - "download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.5.zip", + "download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.6.zip", "packs": [ { "type": "Item", diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 1d51185..74ec197 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -532,7 +532,7 @@

Description

- {{editor data.biodata.description target="system.biodata.description" button=true owner=owner editable=editable}} + {{editor description target="system.biodata.description" button=true owner=owner editable=editable}}
diff --git a/templates/item-don-sheet.html b/templates/item-don-sheet.html index 26e479b..b722c1d 100644 --- a/templates/item-don-sheet.html +++ b/templates/item-don-sheet.html @@ -32,7 +32,7 @@
- {{editor data.sacrifice target="system.sacrifice" button=true owner=owner editable=editable}} + {{editor sacrifice target="system.sacrifice" button=true owner=owner editable=editable}}
{{> systems/fvtt-mournblade/templates/partial-item-description.html}} diff --git a/templates/partial-item-description.html b/templates/partial-item-description.html index 41856c1..89dd3db 100644 --- a/templates/partial-item-description.html +++ b/templates/partial-item-description.html @@ -2,5 +2,5 @@

Description

- {{editor data.description target="system.description" button=true owner=owner editable=editable}} + {{editor description target="system.description" button=true owner=owner editable=editable}}