mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Improved description enrichment to not bloat it outside of the CompendiumBrowser
This commit is contained in:
parent
83c3da0130
commit
e1fef44d21
7 changed files with 46 additions and 41 deletions
|
|
@ -138,10 +138,10 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
|||
* @param {object} [options] - Options that modify the styling of the rendered template. { headerStyle: undefined|'none'|'large' }
|
||||
* @returns {string}
|
||||
*/
|
||||
async getEnrichedDescription() {
|
||||
async getEnrichedDescription(options = { inCompendiumBrowser: false }) {
|
||||
if (!this.metadata.hasDescription) return '';
|
||||
|
||||
const { prefix, value, suffix } = await this.getDescriptionData();
|
||||
const { prefix, value, suffix } = await this.getDescriptionData(options);
|
||||
const fullDescription = [prefix, value, suffix].filter(p => !!p).join('\n<hr>\n');
|
||||
|
||||
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(fullDescription, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue