Add the ability to display / edit the description from the item sheet

This commit is contained in:
Oliver-Akins 2025-02-10 23:04:28 -07:00
parent 46a235b603
commit 69db3ca719
13 changed files with 168 additions and 17 deletions

View file

@ -35,7 +35,7 @@ export class CraftData extends SkillData {
// #endregion
// #region Sheet Data
getFormFields(_ctx) {
async getFormFields(_ctx) {
const fields = [
{
id: `fate-path`,
@ -48,6 +48,15 @@ export class CraftData extends SkillData {
value: aspect,
})),
},
{
id: `description`,
type: `prosemirror`,
label: `RipCrypt.common.description`,
path: `system.description`,
uuid: this.parent.uuid,
value: await TextEditor.enrichHTML(this.description),
collaborative: false,
},
{
type: `group`,
title: `RipCrypt.common.advances`,

View file

@ -48,7 +48,7 @@ export class SkillData extends foundry.abstract.TypeDataModel {
// #endregion
// #region Sheet Data
getFormFields(_ctx) {
async getFormFields(_ctx) {
const fields = [
{
id: `fate-path`,
@ -62,12 +62,13 @@ export class SkillData extends foundry.abstract.TypeDataModel {
})),
},
{
// TODO: Figure out how tf to make this work nicely on a generic level
id: `description`,
type: `prosemirror`,
label: `RipCrypt.common.description`,
path: `system.description`,
collaborative: true,
uuid: this.parent.uuid,
value: await TextEditor.enrichHTML(this.description),
collaborative: false,
},
{
type: `group`,