diff --git a/dnd5e.css b/dnd5e.css index 0b0f77cc00..41f0730e6e 100644 --- a/dnd5e.css +++ b/dnd5e.css @@ -1849,8 +1849,18 @@ h5 { /* ----------------------------------------- */ /* Journal Pages */ /* ----------------------------------------- */ -.journal-editor .tox-tinymce { - height: 100% !important; +.journal-editor { + min-width: 340px; + min-height: 260px; +} +.journal-editor .window-content { + padding: 0; +} +.journal-editor .prosemirror menu { + border-radius: 0; +} +.journal-editor .prosemirror .editor-container { + overflow-y: auto; } .journal-entry-page.class h4, .class-journal h4 { diff --git a/less/journal.less b/less/journal.less index b5f03b4758..11b2163132 100644 --- a/less/journal.less +++ b/less/journal.less @@ -67,8 +67,19 @@ /* ----------------------------------------- */ .journal-editor { - .tox-tinymce { - height: 100% !important; + min-width: 340px; + min-height: 260px; + + .window-content { + padding: 0; + } + .prosemirror { + menu { + border-radius: 0; + } + .editor-container { + overflow-y: auto; + } } } diff --git a/module/applications/journal/class-sheet.mjs b/module/applications/journal/class-sheet.mjs index dffe91b1ec..2c84db2b0b 100644 --- a/module/applications/journal/class-sheet.mjs +++ b/module/applications/journal/class-sheet.mjs @@ -71,7 +71,7 @@ export default class JournalClassPageSheet extends JournalPageSheet { _getAdvancement(item) { const advancement = {}; - const hp = item.advancement.byType.HitPoints[0]; + const hp = item.advancement.byType.HitPoints?.[0]; if ( hp ) { advancement.hp = { hitDice: `1${hp.hitDie}`, @@ -423,7 +423,7 @@ export default class JournalClassPageSheet extends JournalPageSheet { */ _onLaunchTextEditor(event) { event.preventDefault(); - const textKeyPath = event.target.dataset.target; + const textKeyPath = event.currentTarget.dataset.target; const label = event.target.closest(".form-group").querySelector("label"); const editor = new JournalEditor(this.document, { textKeyPath, title: label?.innerText }); editor.render(true); diff --git a/module/applications/journal/journal-editor.mjs b/module/applications/journal/journal-editor.mjs index 7592f09fd0..942f675efd 100644 --- a/module/applications/journal/journal-editor.mjs +++ b/module/applications/journal/journal-editor.mjs @@ -14,7 +14,8 @@ export default class JournalEditor extends DocumentSheet { template: "systems/dnd5e/templates/journal/journal-editor.hbs", width: 520, height: 640, - textKeyPath: null + textKeyPath: null, + resizable: true }); }