Files
fvtt-prism-rpg/module/applications/sheets/spell-sheet.mjs
T
2025-11-06 23:30:37 +01:00

32 lines
1014 B
JavaScript

import PrismRPGItemSheet from "./base-item-sheet.mjs"
export default class PrismRPGSpellSheet extends PrismRPGItemSheet {
/** @override */
static DEFAULT_OPTIONS = {
classes: ["spell"],
position: {
width: 450,
},
window: {
contentClasses: ["spell-content"],
},
}
/** @override */
static PARTS = {
main: {
template: "systems/fvtt-prism-rpg/templates/spell.hbs",
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
context.enrichedColorEffect = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.colorEffect, { async: true })
context.enrichedAscensionEffect = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.ascensionEffect, { async: true })
return context
}
}