Merge pull request #3662 from SillyTavern/enable-md-hotkeys-in-expando Add markdown hotkeys support for expando editor on textareas that support markdown

137927bb43d3aa35e298b7706f487e06dce53e15

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +3 -2Showing whitespace changes
public/scripts/chats.js+3 -2
@@ -1506,7 +1506,7 @@ jQuery(function () {
15061506 embedMessageFile(messageId, messageBlock);
15071507 });
15081508
15091509 $(document).on('click', '.editor_maximize', async function () {
15101510 const broId = $(this).attr('data-for');
15111511 const bro = $(`#${broId}`);
15121512 const contentEditable = bro.is('[contenteditable]');
@@ -1525,6 +1525,7 @@ jQuery(function () {
15251525 textarea.value = String(contentEditable ? bro[0].innerText : bro.val());
15261526 textarea.classList.add('height100p', 'wide100p', 'maximized_textarea');
15271527 bro.hasClass('monospace') && textarea.classList.add('monospace');
1528+ bro.hasClass('mdHotkeys') && textarea.classList.add('mdHotkeys');
15281529 textarea.addEventListener('input', function () {
15291530 if (contentEditable) {
15301531 bro[0].innerText = textarea.value;
@@ -1565,7 +1566,7 @@ jQuery(function () {
15651566 });
15661567 }
15671568
15681569 await callGenericPopup(wrapper, POPUP_TYPE.TEXT, '', { wide: true, large: true });
15691570 });
15701571
15711572 $(document).on('click', 'body.documentstyle .mes .mes_text', function () {