Biographie

This commit is contained in:
Byroks committed 2026-10-23 19:03:16 +02:00
1 parent a903476a72
commit 0da6fa67ac
3 files changed
+33 -25

No files matched your search

+14
View File
@@ -61,6 +61,10 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
id: "hintergrund",
icon: "fa-feather-pointed"
},
{
id: "biographie",
icon: "fa-feather-pointed"
},
{
id: "effects",
icon: "fa-bolt"
@@ -97,6 +101,10 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
template: systemPath("templates/actor/hintergrund.hbs"),
scrollable: [""]
},
biographie: {
template: systemPath("templates/actor/biographie.hbs"),
scrollable: [""]
},
effects: {
template: systemPath("templates/shared/effects.hbs"),
scrollable: [""]
@@ -185,6 +193,9 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
break;
case "hintergrund":
context.fields = await this._getFields();
context.tab = context.tabs[partId];
break;
case "biographie":
context.enrichedBeschreibung =
await foundry.applications.ux.TextEditor.implementation.enrichHTML(
this.actor.system.biographie.beschreibung,
@@ -198,6 +209,9 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe
}
);
context.tab = context.tabs[partId];
break;
default:
context.tab = context.tabs[partId];
}
return context;
}
+17 -24
View File
@@ -4,28 +4,21 @@
data-tab="{{tab.id}}"
data-group="{{tab.group}}"
>
<div class="container">
<div class="row">
{{! Editors must receive enriched text data from getData to properly handle rolls, UUID links, etc. }}
<div class="col-12">
<fieldset style="height:100%">
<legend>{{localize "Midgard6.Item.Description"}}</legend>
{{#if editable}}
<prose-mirror
style="height:100%"
name="system.biographie.beschreibung"
data-document-u-u-i-d="{{actor.uuid}}"
value="{{system.biographie.beschreibung}}"
collaborate="true"
toggled="true"
>
{{{enrichedBeschreibung}}}
</prose-mirror>
{{else}}
{{{enrichedBeschreibung}}}
{{/if}}
</fieldset>
</div>
</div>
</div>
<fieldset style="height:100%">
<legend>{{localize "Midgard6.Sheets.Tabs.biographie"}}</legend>
{{#if editable}}
<prose-mirror
style="height:100%"
name="system.biographie.beschreibung"
data-document-u-u-i-d="{{actor.uuid}}"
value="{{system.biographie.beschreibung}}"
collaborate="true"
toggled="true"
>
{{{enrichedBeschreibung}}}
</prose-mirror>
{{else}}
{{{enrichedBeschreibung}}}
{{/if}}
</fieldset>
</section>