Fix creator notes display field (in char panel) not updating when changed in Advanced Definitions (#4552) * feat: update creator notes display when editing character and updating content * Fix interaction with create form --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Signed| @@ -9794,6 +9794,12 @@ jQuery(async function () { | ||
| 9794 | 9794 | }); |
| 9795 | 9795 | }); |
| 9796 | 9796 | |
| 9797 | + $('#creator_notes_textarea').on('input', function () { | |
| 9798 | + const notes = String($('#creator_notes_textarea').val()); | |
| 9799 | + const avatar = menu_type === 'create' ? '' : characters[this_chid]?.avatar; | |
| 9800 | + $('#creator_notes_spoiler').html(formatCreatorNotes(notes, avatar)); | |
| 9801 | + }); | |
| 9802 | + | |
| 9797 | 9803 | $('#favorite_button').on('click', function () { |
| 9798 | 9804 | updateFavButtonState(!fav_ch_checked); |
| 9799 | 9805 | if (menu_type != 'create') { |