23 lines
652 B
JavaScript
23 lines
652 B
JavaScript
import { RdDTextEditor } from "../apps/rdd-text-roll-editor.js"
|
|
import CommonTemplate from "./common-template.mjs"
|
|
import { HTMLSTRING } from "./field-types.mjs"
|
|
|
|
const fields = foundry.data.fields
|
|
|
|
export class CommonDescription extends CommonTemplate {
|
|
fields() {
|
|
return {
|
|
description: new fields.HTMLField({ ...HTMLSTRING }),
|
|
descriptionmj: new fields.HTMLField({ gmOnly: true, ...HTMLSTRING })
|
|
}
|
|
}
|
|
|
|
async prepareContext(item) {
|
|
return {
|
|
description: await RdDTextEditor.enrichHTML(item.system.description, item),
|
|
descriptionmj: await RdDTextEditor.enrichHTML(item.system.descriptionmj, item),
|
|
}
|
|
}
|
|
|
|
}
|