Improved description enrichment to not bloat it outside of the CompendiumBrowser

This commit is contained in:
WBHarry 2026-03-07 00:31:33 +01:00
parent 83c3da0130
commit e1fef44d21
7 changed files with 46 additions and 41 deletions

View file

@ -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, {