diff --git a/public/index.html b/public/index.html index 4cce6ccc6..d6a19934f 100644 --- a/public/index.html +++ b/public/index.html @@ -6086,8 +6086,11 @@ - - Content + + + Content + + (Tokens: counting...) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 07625437a..0d0e06587 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -2680,8 +2680,10 @@ export async function getWorldEntry(name, data, entry) { $(counter).text(numberOfTokens); }, debounce_timeout.relaxed); + const contentInputId = `world_entry_content_${entry.uid}`; const contentInput = template.find('textarea[name="content"]'); contentInput.data('uid', entry.uid); + contentInput.attr('id', contentInputId); contentInput.on('input', async function (_, { skipCount } = {}) { const uid = $(this).data('uid'); const value = $(this).val(); @@ -2698,7 +2700,9 @@ export async function getWorldEntry(name, data, entry) { countTokensDebounced(counter, value); }); contentInput.val(entry.content).trigger('input', { skipCount: true }); - //initScrollHeight(contentInput); + + const contentExpandButton = template.find('.editor_maximize'); + contentExpandButton.attr('data-for', contentInputId); template.find('.inline-drawer-toggle').on('click', function () { if (counter.data('first-run')) {