import { RdDTextEditor } from "../apps/rdd-text-roll-editor.js"; import { SYSTEM_RDD } from "../constants.js"; import { Misc } from "../misc.js"; export class RdDJournalSheet extends JournalTextPageSheet { static register() { DocumentSheetConfig.unregisterSheet(JournalEntryPage, "core", JournalTextPageSheet) DocumentSheetConfig.registerSheet(JournalEntryPage, SYSTEM_RDD, RdDJournalSheet, { types: ["text"], makeDefault: true, }); } async getData(options) { const journalData = await super.getData(options); journalData.editor.content = await RdDTextEditor.enrichHTML(journalData.document.text.content, this.object) return journalData } activateListeners(html) { super.activateListeners(html); html.find('.roll-text').click(async event => await RdDTextEditor.rollText(event, this.actor)) html.find('.chat-roll-text').click(async event => await RdDTextEditor.chatRollText(event)) } }