Enable links in editor

This commit is contained in:
sladecraven 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();

View File

@ -34,7 +34,7 @@
],
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
"license": "LICENSE.txt",
"version": "10.0.20",
"version": "10.0.21",
"compatibility": {
"minimum": "10",
"verified": "10.286"
@ -333,7 +333,7 @@
],
"socket": true,
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.0.20.zip",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.0.21.zip",
"gridDistance": 1,
"gridUnits": "m",
"primaryTokenAttribute": "sante.vie",

View File

@ -139,7 +139,7 @@
<div class="form-group editor">
<span class="item-name"><h4>Description</h4>
{{editor system.description target="system.description" button=true owner=owner editable=true}}
{{editor description target="system.description" button=true owner=owner editable=true}}
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}

View File

@ -131,7 +131,7 @@
{{!-- Biography Tab --}}
<div class="tab description" data-group="primary" data-tab="description">
<div class="form-group editor">
{{editor system.description target="system.description" button=true owner=owner editable=true}}
{{editor description target="system.description" button=true owner=owner editable=true}}
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
</div>

View File

@ -1,6 +1,6 @@
{{#if options.isGM}}
<h3>Notes du MJ : </h3>
<div class="form-group editor">
{{editor system.notesmj target="system.notesmj" button=true owner=owner editable=editable}}
{{editor notesmj target="system.notesmj" button=true owner=owner editable=editable}}
</div>
{{/if}}

View File

@ -713,11 +713,11 @@
<article class="flexcol">
<h3>Biographie : </h3>
<div class="form-group editor">
{{editor system.biographie target="system.biographie" button=true owner=owner editable=editable}}
{{editor biographie target="system.biographie" button=true owner=owner editable=editable}}
</div>
<h3>Notes : </h3>
<div class="form-group editor">
{{editor system.notes target="system.notes" button=true owner=owner editable=editable}}
{{editor notes target="system.notes" button=true owner=owner editable=editable}}
</div>
<h3>Journal d'Experience</h3>
<div class="form-group editor">

View File

@ -75,7 +75,7 @@
{{!-- Biography Tab --}}
<div class="tab description" data-group="primary" data-tab="description">
<div class="form-group editor">
{{editor content=system.description target="system.description" button=true owner=owner editable=editable}}
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
</div>

View File

@ -9,25 +9,25 @@
<div class="flexcol">
<span><label class="alchimie-title">Manipulation : </label></span>
<div class="form-group medium-editor">
{{editor system.manipulation_update target="system.manipulation" button=true owner=owner editable=editable}}
{{editor manipulation_update target="system.manipulation" button=true owner=owner editable=editable}}
</div>
</div>
<div class="flexcol">
<span><label class="alchimie-title">Utilisation : </label></span>
<div class="form-group small-editor">
{{editor system.utilisation target="system.utilisation" button=true owner=owner editable=editable}}
{{editor utilisation target="system.utilisation" button=true owner=owner editable=editable}}
</div>
</div>
<div class="flexcol">
<span><label class="alchimie-title">Enchantement : </label></span>
<div class="form-group small-editor">
{{editor system.enchantement target="system.enchantement" button=true owner=owner editable=editable}}
{{editor enchantement target="system.enchantement" button=true owner=owner editable=editable}}
</div>
</div>
<div class="flexcol">
<span><label class="alchimie-title">Sur-effet : </label></span>
<div class="form-group small-editor">
{{editor system.sureffet target="system.sureffet" button=true owner=owner editable=editable}}
{{editor sureffet target="system.sureffet" button=true owner=owner editable=editable}}
</div>
</div>

View File

@ -25,7 +25,7 @@
<div class="flexcol">
<span><label>Ingrédients : </label></span>
<div class="form-group editor">
{{editor system.ingredients target="system.ingredients" button=true owner=owner editable=editable}}
{{editor ingredients target="system.ingredients" button=true owner=owner editable=editable}}
</div>
</div>

View File

@ -25,7 +25,7 @@
{{!-- Description Tab --}}
<div class="tab" data-group="primary" data-tab="description">
{{editor system.description target="system.description" button=true owner=owner editable=editable}}
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
{{!-- Attributes Tab --}}

View File

@ -1,14 +1,14 @@
<div class="flexcol">
<span><label>Description : </label></span>
<div class="form-group editor">
{{editor system.description target="system.description" button=true owner=owner editable=editable}}
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
</div>
{{#if isGM}}
<div class="flexcol">
<span><label>Description (MJ seulement): </label></span>
<div class="form-group editor">
{{editor system.descriptionmj target="system.descriptionmj" button=true owner=owner editable=editable}}
{{editor descriptionmj target="system.descriptionmj" button=true owner=owner editable=editable}}
</div>
</div>
{{/if}}