Enable links in editor

This commit is contained in:
2022-09-27 21:03:18 +02:00
parent 1b8ad316b9
commit 4afa313ffc
14 changed files with 35 additions and 17 deletions

View File

@ -40,6 +40,9 @@ export class RdDActorEntiteSheet extends ActorSheet {
options: this.options,
owner: this.actor.isOwner,
itemsByType: Misc.classify(this.actor.items.map(i => foundry.utils.deepClone(i))),
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
notesmj: await TextEditor.enrichHTML(this.object.system.notesmj, {async: true}),
};
formData.options.isGM = game.user.isGM;

View File

@ -52,6 +52,9 @@ export class RdDActorSheet extends ActorSheet {
limited: this.actor.limited,
options: this.options,
owner: this.actor.isOwner,
biographie: await TextEditor.enrichHTML(this.object.system.biographie, {async: true}),
notes: await TextEditor.enrichHTML(this.object.system.notes, {async: true}),
notesmj: await TextEditor.enrichHTML(this.object.system.notesmj, {async: true}),
itemsByType: Misc.classify(this.actor.items.map(i => foundry.utils.deepClone(i))),
}
RdDUtility.filterItemsPerTypeForSheet(formData)

View File

@ -41,6 +41,8 @@ export class RdDActorVehiculeSheet extends ActorSheet {
options: this.options,
owner: this.actor.isOwner,
itemsByType: Misc.classify(this.actor.items.map(i => foundry.utils.deepClone(i))),
description: await TextEditor.enrichHTML(this.object.system.biographie, {async: true}),
notesmj: await TextEditor.enrichHTML(this.object.system.notesmj, {async: true}),
};
RdDUtility.filterItemsPerTypeForSheet(formData);

View File

@ -74,7 +74,10 @@ export class RdDItemSheet extends ItemSheet {
owner: this.item.isOwner,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
isSoins: false
isSoins: false,
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
descriptionmj: await TextEditor.enrichHTML(this.object.system.descriptionmj, {async: true})
}
if (this.actor) {
formData.isOwned = true;
@ -93,8 +96,15 @@ export class RdDItemSheet extends ItemSheet {
formData.competences = await RdDUtility.loadCompendium('foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it));
console.log(formData.competences)
}
if (this.item.type == 'recettecuisine') {
formData.ingredients = await TextEditor.enrichHTML(this.object.system.ingredients, {async: true})
}
if (this.item.type == 'recettealchimique') {
RdDAlchimie.processManipulation(this.item, this.actor && this.actor.id);
formData.manipulation_update = await TextEditor.enrichHTML(this.object.system.manipulation_update, {async: true})
formData.utilisation = await TextEditor.enrichHTML(this.object.system.utilisation, {async: true})
formData.enchantement = await TextEditor.enrichHTML(this.object.system.enchantement, {async: true})
formData.sureffet = await TextEditor.enrichHTML(this.object.system.sureffet, {async: true})
}
if (this.item.type == 'gemme') {
formData.gemmeTypeList = RdDGemme.getGemmeTypeOptionList();